Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to get the edge position of a part?

Asked by 4 years ago

so i need the edge of a side but it needs to always be the right side and the side might be any side i have already got the side i can't get the edge also the part might be rotated 90 degrees 180 or 270 is there anyway way to get the right edge?

1 answer

Log in to vote
1
Answered by 4 years ago

You can use CFrame.Angles and Orientation to decide the CFrame rotation of the part.

PartCFrameRotation = Part.CFrame * CFrame.Angles(-math.rad(Part.Orientation.X), 0, 0) -- I don't know the exact axes

If you know the size of the part you can multiply this value with CFrame.new() to get to the edge.

Ad

Answer this question