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

How should I yield until TweenPosition finishes?

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

1 comment

0

Why not wait the same length of time you put in the TweenPosition (TIME)?

1 answer

✓ Accepted answer
GUI:TweenPosition(UDim2, nil, nil, TIME);
wait(TIME)

This will wait until the tween is complete

1 comment

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

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