You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? I wanted a textbutton that can cancel a cutscene and instantly skip back to viewing a part named “MenuPart” in workspace.
What is the issue? Currently I’ve scripted a cutscene on client that runs 5 second after script loaded, and I’m using TweenService to tween the cutscene.
However, I wanted when a textbutton is clicked the cutscene will stop and the player will view the part mentioned above without the camera continue tweening.
What solutions have you tried so far? I’ve tried making the player die so the camera can reset, or disabling the scripts, however, no matter what method I used, the tweening still continues
local Player = game.Players.LocalPlayer
local Character = Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid.Died:Connect(function()
-- Tween:Stop() or Camere.CameraType = Enum.CameraType.Custom
end)
local lastTween
local function start()
if lastTween then lastTween:Cancel() end
local tween = TweenService:Create(...):Play()
tween:Play()
lastTween = tween
end