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

Why is my tween not pausing inside a loop?

Asked by
Neatwyy 123
4 years ago
Edited 4 years ago

I have this script where it tweens the camera cframe and the blur, but I can't pause it in a loop.

01local plr = game.Players.LocalPlayer
02local TS = game:GetService("TweenService")
03local camera1 = game.Workspace.Camera1
04local camera2 = game.Workspace.Camera2
05local camera = game.Workspace.CurrentCamera
06local blur = game.Lighting.Blur
07local started = false
08local TI = TweenInfo.new(
09    8,
10    Enum.EasingStyle.Linear,
11    Enum.EasingDirection.Out,
12    0,
13    false,
14    0
15)
View all 51 lines...

Does anyone know how to pause the tween?

0
I'm not completely sure, but maybe override has to be enabled to pause it. sngnn 274 — 4y

1 answer

Log in to vote
0
Answered by
Neatwyy 123
4 years ago

Whoops! I forgot it's in a while loop so the MouseButton1Click event won't run. :P I've put the MouseButton1Click event inside the loop and it worked!

Ad

Answer this question