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

What is the proper way to use UDim2.new?

local Frame = script.Parent
local Label1 = script.Parent.Label1
local Label2 = script.Parent.Label2

game.Players.PlayerAdded:connect(function(Player)
	for i=1, 800 do
		Label1.AbsolutePosition = UDim2.new(Label1.AbsolutePosition.X + 0,1,Label1.AbsolutePosition.Y + 0,0) -- This is not the proper way because the script breaks here--
		wait(1)
		
	end
	
end)

1 answer

✓ Accepted answer

The AbsolutePosition property is read only, which means that it can't be set. If you wish to change Label1's position then modify its Position property instead.

You could also use the TweenPosition method if you're looking to smoothly tween a GUI object to a particular position.

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