so I'm making this invisible block that when you touch it forces you into first-person perspective. I got an error saying "Workspace.FirstPersonActivator.Script:3: attempt to index nil with 'CameraMaxZoomDistance'" in the output box. I don't understand the error message. can someone help?
local player = game.Players.LocalPlayer
script.Parent.Touched:Connect(function()
player.CameraMaxZoomDistance = 0.5
end)

1 comment
Whenever your dealing with cameras make sure you use Enum