Skip to content

Instantly share code, notes, and snippets.

View Parihsz's full-sized avatar
🥶

Ace9b4 Parihsz

🥶
View GitHub Profile
@Parihsz
Parihsz / FindEdges.lua
Created November 24, 2023 00:36
find edges
local function FindEdges(Object, Directional)
local _CF = Object.CFrame
local Size = Object.Size
local function UpdateCFrame(CF, direction)
local Directions = {
["Top"] = CF + CF.UpVector * (Size.Y/2),
["Bottom"] = CF + CF.UpVector * -(Size.Y/2),
["Left"] = CF + CF.RightVector * -(Size.X/2),
["Right"] = CF + CF.RightVector * (Size.X/2),