Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How Do I make a part look at another part using Orientation and NOT CFrame?

How do I make a part look at another part using Orientation? I am aware CFrame exists, but I DON'T want to use CFrame. I need to use orientation. Any advice?

1 answer

i am not sure if this fits your conditions, but this does not change the CFrame property:

local z, x, y = CFrame.new(origin.Position, target.Position):ToOrientation()

origin.Orientation = Vector3.new(
    math.deg(z),
    math.deg(x),
    math.deg(y)
)

:ToOrientation gives you the orientation of CFrame in radians, you need to convert them to degress using math.deg and i don't know why the order is Z, X, Y, no math genius as you can see.

3 comments

0

ong you used cframe reported for misinfomition

0

i'm so sory pls don't ban :c

0

ye plz no ban he didnt mean it :c

This discussion is preserved as it was. New answers, comments, and votes are closed.