So I have a script that tweens something that takes a long time, like 20 seconds or so.

But then I have another tween that I want to make but it won't work because there is already a tween happening.

How would I stop the first tween so the second one can play?

Thanks!

6 comments

0

Are you using TweenService? Or GuiObject:TweenPosition?

0

:TweenPosition takes an override argument. gui_object:TweenPosition(goal_position, goal_direction, goal_style, time, override, callback) Supply the fifth argument with true. This will override other currently playing tween.

0

Mr. ProgrammerHere maybe post that as an answer but idk

0

I'd do what programmerHere said, but if you want it to just stop, I think you can use GuiObject:TweenPosition(GuiObject.Position, direction, style, 0, true).

0

you can (and should) use TweenService to use Tween:Cancel

0

Got it all and I'll try, tho I can't give rep to anyone. Thanks!