Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make a union rotate while keeping its original orientation?

I'm trying to make a union spin, and it works but it doesn't keep it's original rotation, it resets back to 0,0,0. What can I do to fix that? This is my script so far.

local part = script.Parent
a = 0
repeat
part.Rotation = Vector3.new( 0, a, 0) 
wait(.01) 
a = a+3 
until nothing == 1 

1 answer

✓ Accepted answer

Instead of setting the Rotation to (0, a, 0) and adding 3 to a each time, start with the original rotation and add (0, 3, 0) each time.

local part = script.Parent
repeat
part.Rotation = part.Rotation + Vector3.new( 0, 3, 0) 
wait(.01) 
until nothing == 1 

This discussion is preserved as it was. New answers, comments, and votes are closed.