Im just really confused. I don't know what makes it spin and how to script it. Can you help please?
Well it's pretty simple you can use a for loop if you want the part to spin a certain amount of times or a while loop which would make spin infinitely unless you call a break which would stop it there are other methods of spinning of objects but this is the way that i know how.
01 | --parts name will be brick |
02 |
03 | brick = script.Parent |
04 | for i = 1 , 100 do |
05 | brick.CFrame = brick.CFrame *CFrame.Angles( 1 , 0 , 0 ) |
06 | wait() |
07 | end |
08 |
09 | --or a while loop |
10 |
11 | while true do |
12 | wait() |
13 | brick.CFrame = brick.CFrame *CFrame.Angles( 1 , 0 , 0 ) |
14 | end |
Set Anchored
to false on the part and then set the RotVelocity
property to the desired direction you want the part to rotate.
1 | while true do |
2 | script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ( 0 , 0.1 , 0 ) |
3 | wait( 0.01 ) |
4 | end |
OR
1 | while true do |
2 | script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ( 0.05 , 0.05 , 0.05 ) |
3 | wait() |
4 | end |