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

How Would I Use This Loop To Move The Gui /Image Label Down?

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?

1 answer

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.

2 comments

0

May you please write a line with that please? >-<

0

Edited the code with the loop.

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