#Cutsences Bugged!

1 messages · Page 1 of 1 (latest)

tepid nymph
#

so i was doing a transform script with cutscenes but it doesn't work like i think at all.

#

Camera script:

--// Services
local REP = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")

--// Player
local Player = game:GetService("Players").LocalPlayer

local Camera = workspace.CurrentCamera

--//Remote
local CutsceneFodler = REP:WaitForChild("Cutscenes")
local CutRemote = CutsceneFodler:WaitForChild("Remote"):WaitForChild("Cutscene")

local connection

CutRemote.OnClientEvent:Connect(function(MiyabiCam)

if MiyabiCam == "END" then
    if connection then
        connection:Disconnect()
        connection = nil
    end
    Camera.CameraType = Enum.CameraType.Custom
    return
end

local CamPart = MiyabiCam:WaitForChild("Torso")

Camera.CameraType = Enum.CameraType.Scriptable

if connection then
    connection:Disconnect()
end

connection = RunService.RenderStepped:Connect(function()
    Camera.CFrame = CamPart.CFrame
end)

end)

#

Transform script:
--// Services
local REP = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")

--// Remote
local Folder = REP:WaitForChild("UltRemotes")
local UltRemote = Folder:WaitForChild("UltimateTransformRemote")
local lockPlr = Folder:WaitForChild("LockPlayer")

local CutsceneFodler = REP:WaitForChild("Cutscenes")
local CutRemote = CutsceneFodler:WaitForChild("Remote"):WaitForChild("Cutscene")

--// Variables
local IsLockPlr = false

UltRemote.OnServerEvent:Connect(function(plr)

print("Got signal")

local Character = plr.Character
local Humanoid = Character:WaitForChild("Humanoid")

local CutscenesAnimsFolder = REP:WaitForChild("Cutscenes")

local Mech = plr:GetAttribute("Mecha")

if plr:GetAttribute("UltActive") == true then
    if Mech == "TMD-007" then
#

--// Cutscene
local TMD_CUTSCENE_ANIM = CutscenesAnimsFolder:WaitForChild("TMD-007"):WaitForChild("Summon")

        Character.HumanoidRootPart.Anchored = true

        local TMDModelClone1 = REP:WaitForChild("MechasModels"):WaitForChild("TMD-007"):Clone()
        TMDModelClone1.Parent = workspace
        TMDModelClone1.HumanoidRootPart.CFrame = Character.HumanoidRootPart.CFrame
        TMDModelClone1.HumanoidRootPart.Anchored = true

        local MiyabiCamClone = REP:WaitForChild("Camera"):WaitForChild("Miyabi"):Clone()
        MiyabiCamClone.Parent = workspace
        MiyabiCamClone.HumanoidRootPart.CFrame = Character.HumanoidRootPart.CFrame
        MiyabiCamClone.HumanoidRootPart.Anchored = true
        
        local UserUltAnimation = Character.Humanoid.Animator:LoadAnimation(TMD_CUTSCENE_ANIM.User)
        local MechaUltAnimation = TMDModelClone1.Humanoid.Animator:LoadAnimation(TMD_CUTSCENE_ANIM.Mecha)
        local CamUltAnimation = MiyabiCamClone.Humanoid.Animator:LoadAnimation(TMD_CUTSCENE_ANIM.Camera)
        
        CutRemote:FireAllClients(MiyabiCamClone) -- for following the cam for players
        UserUltAnimation:Play()
        MechaUltAnimation:Play()
        CamUltAnimation:Play()
#

--Prevent Moving
IsLockPlr = true
lockPlr:FireAllClients(IsLockPlr)

        CamUltAnimation.Stopped:Wait() -- wait until the animation end
        
        --// TransFormation
        local TMDModelClone2 = REP:WaitForChild("MechasModels"):WaitForChild("TMD-007"):Clone()
        
        local PlayerOldCharacter = Character
        local PlayerNewCharacter = TMDModelClone2
        local PlayerHumanoid = PlayerNewCharacter:WaitForChild("Humanoid")
        
        PlayerNewCharacter.Name = plr.Name
        plr.Character = PlayerNewCharacter
        
        local RootPart = PlayerNewCharacter:WaitForChild("HumanoidRootPart")
        local OldCFrame = PlayerOldCharacter:GetPivot()
        PlayerNewCharacter:PivotTo(OldCFrame * CFrame.new(0, 10, 0))
        
        PlayerOldCharacter.Parent = ServerStorage
        
        PlayerNewCharacter.Parent = workspace
        
        --Continue Moving
        
        CutRemote:FireAllClients("END")
        
        IsLockPlr = false
        lockPlr:FireAllClients(IsLockPlr)
    end
end

end)

#

the IsLockedPlr aren't being used yet

#

here is the vid when i try test it

fathom cipherBOT
#

studio** You are now Level 1! **studio

tepid nymph
#

and then turn player's character from normal one to model

tepid nymph
#

Cutsences Bugged! (Not solved yet)

gilded delta
tepid nymph
#

i already fixed it by syncing the Cframe of Camera and CamPart so it is now work, but thanks for your answer! 😄