I have a script on the client that triggers a cutscene, I need the cutscene to trigger after a TextButton is clicked. How can I do this?
local camera = game.Workspace.Camera
function tween (part1,part2,cutsceneTime)
local tweenInfo = TweenInfo.new(
cutsceneTime,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = part1.CFrame
local tween = TweenService:Create(camera, tweenInfo, {CFrame = part2.CFrame})
tween:Play()
wait(cutsceneTime)
camera.CameraType = Enum.CameraType.Custom
end
wait(2)
tween(game.Workspace.Test1,game.Workspace.Test2,5)
tween(game.Workspace.Test2,game.Workspace.Test3,2)
tween(game.Workspace.Test3,game.Workspace.Test4,2)```