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

How do you change Orientation via CFrame?

I've wanted to make a spinning brick for a long time, I know how to do all rest of the code except the CFrame Orientation.

Please tell me how to change the Orientation of a brick via CFrame.

1 answer

✓ Accepted answer

just use CFrame.Angles()

local part = workspace.Part -- mayb this was the part

part.CFrame = part.CFrame * CFrame.Angles(0,math.rad(90),0) -- rotate it by 90 degrees

2 comments

0

I'm sure there's a easier way but thank you.

0

There is an easier way, "CFrame.fromEulerAnglesXYZ" this is common in part rotation scripts.

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