So I have this script:
local Tween = Gui.Intro:TweenPosition(UDim2.new(0.036,-50,0.079,-50),"Out","Quad",0.5,false)
repeat
wait()
until Tween == true
But that loops ends before the tween ends... Is there a more efficient way of doing this?
So I have this script:
local Tween = Gui.Intro:TweenPosition(UDim2.new(0.036,-50,0.079,-50),"Out","Quad",0.5,false)
repeat
wait()
until Tween == true
But that loops ends before the tween ends... Is there a more efficient way of doing this?
Your code isn't doing what you think it's doing. GuiObject:TweenPosition() returns whether or not the tween will play.
Simply call wait() for the time the tween will take, after making the GuiObject:TweenPosition() call, rather than looping.
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
This and another option is to supply the callback parameter but thats kinda inconvenient
So your saying use Tween:Wait()?
No, I was merely talking about calling the built-in wait() function.
Ohhh so just wait(0.5)?
Right.
Alright thanks!