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

How should I yield until TweenPosition finishes?

Asked by 9 years ago

Lets say I'm moving a GUI with tweenPosition.

GUI:TweenPosition(UDim2, nil, nil, TIME);

I don't want to do anything until tweenposition finishes. How do I implement this?

Events? Or do I have to use the sketchy wait() until?

repeat wait() until GUI.Position == UDim2 -- the same UDim2 from above
0
Why not wait the same length of time you put in the TweenPosition (TIME)? General_Scripter 425 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago
GUI:TweenPosition(UDim2, nil, nil, TIME);
wait(TIME)

This will wait until the tween is complete

0
In terms of what I was doing, I was trying to make a GUI tweenPosition to two places successively. Problem was, Wait(TIME) is not very consistent. Turns out all I really needed to do was turn on override randomsmileyface 375 — 9y
Ad

Answer this question