Hi! I have this cutscene that moves from p1 to p2. However, i cant get the cutscene to stop when i press play? Any ideas? Thanks in advance!
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local char = player.Character
local p1 = workspace.Cutscene.cam1
local p2 = workspace.Cutscene.cam2
local playbutton = script.Parent.ClearFrame.PlayButton
repeat wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = p1.CFrame
local function TweenCamera(pos)
local TweenService = game:GetService("TweenService")
local TweenInf = TweenInfo.new(5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0)
local Tween = TweenService:Create(camera, TweenInf, {CFrame = pos})
Tween:Play()
end
wait(2)
TweenCamera(p2.CFrame)
playbutton.MouseButton1Click:Connect(function()
camera.CameraType = Enum.CameraType.Custom
script.Parent.ClearFrame.Visible = false
coroutine.yield(TweenCamera)
end)

1 comment
Maybe is it because the repeat wait(). Turn it to scriptable once the character loads in maybe instead of a repeat.