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

Why doesn't this rotation script work on the parent of the script?

Asked by 4 years ago
Edited 4 years ago

I am trying to learn basic rotation and I tried make a script that rotates a part 180 degrees and this is what I did, but I am not sure what else to do since it doesn't really work

wait(3)
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0, math.pi, 0)

1 answer

Log in to vote
2
Answered by 4 years ago

It does rotate, it just looks the same cause you rotated it by 180.

0
so it actually did rotate 180? User#30241 0 — 4y
0
Yes. change it to math.rad(90) and it works too. bittersweetfate 142 — 4y
0
math.pi / 2 rotates it by 90 degrees as well. That's just radians. math.rad() changes the number between it in degrees into radians so that might be easier to do. lazycoolboy500 597 — 4y
Ad

Answer this question