Hello! I made an intro cutscene that runs whenever you join the game. Now I want to add a textbutton that makes the cutscene (tween) stop playing. How do I do that? I tried to set the cameratype back to custom but that didn’t work. From what I’ve heard, disabling the script that plays the cutscene isn’t a good idea.
This is the local script inside StarterPlayerScripts that fires the cutscene:
local TweenService = game:GetService("TweenService")
local camera = game.Workspace.Camera
local cutscenetime = 24
local tweenInfo = TweenInfo.new(
cutscenetime,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
function tween(part1,part2)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = part1.CFrame
local tween = TweenService:Create(camera, tweenInfo, {CFrame = part2.CFrame})
tween:Play()
end
repeat
wait()
until game:IsLoaded()
game.ReplicatedStorage.Events:WaitForChild("SetWalkSpeedEvent"):FireServer(0,0)
tween(game.Workspace.Camera_1, game.Workspace.Camera_2)
Don’t mind about the setwalkspeedevent. That’s just to stop the player from moving while the cutscene is playing.