print("Playing Cutscene")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local HumanoidRootPart = character:WaitForChild("HumanoidRootPart")
local Animator = humanoid:WaitForChild("Animator")
local CurrentCamera = game.Workspace.CurrentCamera
if Animator then
local Animation : AnimationTrack = Animator:LoadAnimation(game.ReplicatedStorage.TestCutscene)
local frameTime = 0
if Animation then
Animation:Play()
CurrentCamera.CameraType = Enum.CameraType.Scriptable
end
Animation.Ended:Connect(function()
CurrentCamera.CameraType = Enum.CameraType.Custom
print("Cutscene Ended")
end)
game["Run Service"].RenderStepped:Connect(function(DT)
frameTime += (DT * 60)
local frameName = tonumber(math.ceil(frameTime))
print("Looking for frame:", frameName)
local NeededFrame = game.ReplicatedStorage["Gojo Cutscene FR"].Frames:FindFirstChild(frameName)
if NeededFrame then
local frameCFrame = HumanoidRootPart.CFrame * NeededFrame.Value
CurrentCamera.CFrame = frameCFrame
else
print("Frame not found:", frameName)
end
end)
end
So im trying to make a cutscene,but the camera keeps going back to the rig that i made the cutscene on. Can somebody help pls!