I made a script witch should make players camera work like 2d game it works fine but once i die i get this error saying HumanoidRootPart is not a valid member of Model
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
player.CharacterAdded:Wait()
player.Character:WaitForChild("HumanoidRootPart")
camera.CameraSubject = player.Character.HumanoidRootPart
camera.CameraType = Enum.CameraType.Attach
camera.FieldOfView = 40
game:GetService('RunService').Stepped:Connect(function()
camera.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position) * CFrame.new(0,0,30)
end)

1 comment
Could you try putting a :WaitForChild() on HumanoidRootPart?