Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

UDim2 move to specific position?

Asked by
NexeusX 137
7 years ago
Edited 7 years ago

So i want to have an Gui with an Image Label that moves to numbered position from one place to the other point "A Pos" And a point "B Pos" so i want it to look like it is sliding across the screen too that point but i don't know how i should do that? do i use a "repeat until" or a "for i = 1,? do" script?

for i = 1,70 do
script.Parent.Positon = script.Parent.Positon + UDMI2.new(0,1,0,1)

1 answer

Log in to vote
1
Answered by
1N0body 206 Moderation Voter
7 years ago
Edited 7 years ago

Use tweens

script.Parent:TweenPosition(UDim2.new( 0,200,0,200 ),'InOut','Quad',2)

Change values accordingly

Ad

Answer this question