I need help making a GUI rotate smoothly until a certain point then it stops
I have only made a GUI what turns invisible after a certain point but stopping it is too hard.
someone please help?
-- xBenDaiiAlt/xBenDaii
1 | script.Parent.TextButton.MouseButton 1 Click:Connect( function () -- connect to a function when you want this to run |
2 | for i = 0 , 180 , 1 do -- the first number is where it will start the rotation the second is where it will end and the third one is by how many time it will rotate |
3 | wait( 0.001 ) -- make this numbers smaller to make it faster or make it biger to make it slower |
4 | script.Parent.Frame.Rotation = i --your UI that you rotating .Rotation = i |
5 | end |
6 | end ) |