I’ve made a camera tween using AlvinBlox’s tutorial, but the problem is, the tween runs when the player resets.
How would I make it so that it does not reset when the player dies? I might want it to run multiple times, but not when the player resets.
Code
local TweenService = game:GetService("TweenService")
local cams = game.Workspace.Cameras
local done = false
local camera = game.Workspace.Camera
local sceneTime = 20
local tweeninfo = TweenInfo.new(
sceneTime,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
function tween(camera1, camera2)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = camera1.CFrame
local tween = TweenService:Create(camera, tweeninfo, {CFrame = camera2.CFrame})
tween:Play()
wait(sceneTime)
camera.CameraType = Enum.CameraType.Custom
end
wait(2)
tween(cams.Camera1, cams.Camera2)
tween(cams.Camera3, cams.Camera4)
tween(cams.Camera5, cams.Camera6)
tween(cams.Camera7, cams.Camera8)
tween(cams.Camera9, cams.Camera10)
Thanks!