I am trying to make a loop move something down for every time it goes through this for loop.
for i=1,120 do
spinner.ImageTransparency = i/120
text.TextTransparency = i/120
How would I use this loop to make it's move go downward?
I am trying to make a loop move something down for every time it goes through this for loop.
for i=1,120 do
spinner.ImageTransparency = i/120
text.TextTransparency = i/120
How would I use this loop to make it's move go downward?
You can add a UDim2 to a UDim2, so you can add a position offset to the current value of the position of the textbox. Just change distance to however far you want it to be.
for i=1,120 do
spinner.ImageTransparency = i/120
text.TextTransparency = i/120
text.Position = UDim2.new(0,0,0,distance) + text.Position
end
Also, might I recommend using text:TweenPosition(UDim2.new(position)) instead? It is a bit smoother.
**EDIT: Added the code for the loop in to make it more clear.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
May you please write a line with that please? >-<
Edited the code with the loop.