Players.Puma_incredible.PlayerScripts.LocalScript:9: attempt to index nil with 'CFrame'

Can Someone please help me with this camera script?
Everything works except for the line to change the camera’s CFrame

The script is a localScript


local Baldi = game.Workspace:WaitForChild("Baldi")
local JumpScarePart = Baldi:FindFirstChild("JumpScarePart")
local Player = game.Players.LocalPlayer
local Camera = game.Workspace.CurrentCamera


Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = JumpScarePart.CFrame
1 Like

Does an instance named JumpScarePart exist in the Baldi model? Did you spell it exactly how it’s named? If you answered yes to both of those questions, try using WaitForChild instead of FindFirstChild.

There is a instance called JumpScarePart and The FindFirstChild Works its just the CFrame not working

Are you sure it does? Try printing out the instance before and after the wait duration and see what the output displays: