Hey Developers!
I've made a cutscene that plays local to a player whenever a player joins the game, if they reset their character the camera remains in the same position, I'm trying to make it so when they press the "Skip Button" (which is actually the play button) for the cutscene to stop remaining in the same position and move back to the player's default camera state. I'm also want for the player to spawn on a spawn location after pressing the play button. Here is the local script for the camera cutscene: Thank you in advance
local TweenService = game:GetService("TweenService") local camera = game.Workspace.Camera local PlayButton = script.Parent local cutsceneTime = 3 --this will change the length of your cutscene in seconds local tweenInfo = TweenInfo.new( cutsceneTime, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0 )
local function tween(part1,part2) camera.CameraType = Enum.CameraType.Scriptable camera.CFrame = part1.CFrame
local tween = TweenService:Create(camera, tweenInfo, {CFrame = part2.CFrame}) tween:Play() PlayButton.MouseButton1Down:Connect(function() camera.CameraType = Enum.CameraType.Custom end)
end
wait()
tween(Workspace.Test1, Workspace.Test2)
local tween = TweenService:Create(camera, tweenInfo, {CFrame = part2.CFrame}) tween:Play()
PlayButton.MouseButton1Click:Connect(function() -- Its Supposed To be MouseButton1Click
camera.CameraType = Enum.CameraType.Custom end)