local Camera = game.Workspace.CurrentCamera
local campart = game.Workspace.CutsceneParts.CamPart2
script.Parent.Triggered:Connect(function(plr)
-- Ensure camera is in Scriptable mode
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = nil -- Set CameraSubject to nil or the specific part
-- Wait a moment to ensure the camera is ready to move
wait(0.1)
-- Move camera to the desired part's position
Camera.CFrame = campart.CFrame
-- Play the necessary effects and trigger events
game.ReplicatedStorage.Door1Opened:Fire(plr)
script.Parent.Parent.UnlockSFX:Play()
-- Wait for the sound or other effects to finish
wait(.817)
-- Clean up the object after the cutscene
game.Debris:AddItem(script.Parent.Parent.Parent, .1)
end)
Ensure this is a LocalScript in StarterPlayerScripts or StarterCharacterScripts or Gui in StarterGui
For testing purposes (Because I don’t know your full setup or intentions) I have isolated the camera portion of the script and was able to verify it will indeed work. Script was in StarterPlayerScripts for testing
local Camera = workspace.CurrentCamera
local campart = workspace.CutsceneParts:WaitForChild("CamPart2")
-- Ensure camera is in Scriptable mode
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = nil -- Set CameraSubject to nil or the specific part
-- Wait a moment to ensure the camera is ready to move
wait(0.1)
-- Move camera to the desired part's position
Camera.CFrame = campart.CFrame
-- Play the necessary effects and trigger events
--game.ReplicatedStorage.Door1Opened:Fire(plr)
--script.Parent.Parent.UnlockSFX:Play()
-- Wait for the sound or other effects to finish
--wait(.817)
-- Clean up the object after the cutscene
--game.Debris:AddItem(script.Parent.Parent.Parent, .1)
Hmmmm, maybe it’s a studio issue. It also might be because the camera changes after an event is fired, the camera might not work like that. Idk, I have been having a lot of problem with bugless scripts lately
Edit: it is most likely a problem with the event. As I tested it without the event(that way the camera doesn’t have to wait before changing) and it works fine. But one thing I do know is the the event does 100% fire, as other scripts that interpret the same event work. It’s just an issue with this specific script.