game.Workspace
equates to workspace
, which reduces character count, and one that I use. It’s a global variable created by Roblox. (although, it really just depends on yourself if you’d want to use it or not)
You should use workspace.Currentcamera
to access the camera, not workspace.Camera
.
Setting the CameraType
can be unreliable because it can sometimes set it before the character spawns in, and when it does, the CameraType
will revert back to Custom
. To fix this, you can set this on top of your script instead of waiting for 5 seconds, which is more reliable.
local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer or Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()
On another note, you can just do
camera.CFrame = game.Workspace.Cutscene1.CFrame
instead of creating an entirely new CFrame
.