I have this script where it tweens the camera cframe and the blur, but I can't pause it in a loop.
local plr = game.Players.LocalPlayer local TS = game:GetService("TweenService") local camera1 = game.Workspace.Camera1 local camera2 = game.Workspace.Camera2 local camera = game.Workspace.CurrentCamera local blur = game.Lighting.Blur local started = false local TI = TweenInfo.new( 8, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0 ) local BlurTI = TweenInfo.new( 1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0 ) repeat local blurtween = TS:Create(blur, BlurTI, {Size = 50}) blurtween:Play() wait(2) local unblurtween = TS:Create(blur, BlurTI, {Size = 0}) unblurtween:Play() local camtween = TS:Create(camera, TI, {CFrame = camera2.CFrame}) camera.CameraType = Enum.CameraType.Scriptable camera.CFrame = camera1.CFrame camtween:Play() wait(7.8) function stop() blurtween:Pause() unblurtween:Pause() camtween:Pause() end until started == true script.Parent.MouseButton1Click:Connect(function() started = true stop() camera.CameraType = Enum.CameraType.Custom script.Parent.Parent:Destroy() end)
Does anyone know how to pause the tween?
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!