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

How do you change Orientation via CFrame?

Asked by 5 years ago

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

Log in to vote
0
Answered by 5 years ago

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
0
I'm sure there's a easier way but thank you. TechGamar 30 — 5y
0
There is an easier way, "CFrame.fromEulerAnglesXYZ" this is common in part rotation scripts. LoganboyInCO 150 — 5y
Ad

Answer this question