Ad
Log in to vote
3

How do I move a GUI?

Asked by 7 years ago

How do I make a GUI come in from the right side and move, then go away?

Current Position(Final Spot) {0, 0}, {0.5, 0}

Current Size {0.400000006, 0}, {0.300000012, 0}

2 answers

Log in to vote
0
Answered by
Tesouro 407 Moderation Voter
7 years ago

Tween is the best way, but if you can't use it (for any reason), make a loop. Repeat is a good alternative, an example:

repeat
    gui.Position = gui.Position + UDim2.new(0, 0, 0.1, 0)
    gui.Size = gui.Size + UDim2.new(0.08, 0, 0.06, 0)
    wait()
until gui.Position == UDim2.new(0, 0, 0.5, 0) -- it will repeat 5 times

It does the same thing, but it's more difficult and you need to synchronize the values. But if you want to walk on the wild side...

Ad
Log in to vote
1
Answered by 7 years ago

Take a look at TweenPosition

Answer this question