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

Why is my part's rotation not working at all?

Asked by
6zk8 95
4 years ago
script.Parent.Orientation = CFrame.new(5, 7, 5)

Very simple, im just new to CFrame.

0
try changing CFrame.new to Vector3.new Leamir 3138 — 4y
0
it now works 6zk8 95 — 4y
0
thanks 6zk8 95 — 4y
0
whats the difference? 6zk8 95 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

You have to use part.CFrame * CFrame.Angles() since it's basically adding the angles and the position except you use multiplication instead of using +. Also, you're supposed to use math.rad since it converts radiance into degrees.

script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(5), math.rad(7), math.rad(5))
Ad

Answer this question