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

How would I change the rotation of a part?

Asked by 10 years ago

I want to change the rotation of a part but I don't know how to format it in a statement in a script. I tried this:

script.Parent.Rotation = CFrame.new(0, 0, 0)

but of course it doesn't work, so how do I change the rotation of an object?

1 answer

Log in to vote
0
Answered by
Kyokamii 133
10 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

This one is better. Try it


while true do script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0.2,0) wait(0.1) end
0
I'm guessing the (0, 0.2, 0) value changed the object's rotation to (0, 0.2, 0), correct? whyOmustOitObeOme 7 — 10y
0
And btw this doesn't do anything to the object... whyOmustOitObeOme 7 — 10y
Ad

Answer this question