Problem with first person camera

I’m trying to make a code that, after 5 seconds, puts the camera in first person.
But there is a problem, because the script works correctly, but the camera is stuck. Please help me:

local player = game:GetService("Players")
local localplayer = player.LocalPlayer
wait(5)
localplayer.CameraMode = Enum.CameraMode.LockFirstPerson

Put a local script in StarterCharacterScripts then put this in it:

local player = game.Players.LocalPlayer
task.wait(5)
player.CameraMode = Enum.CameraMode.LockFirstPerson

It’s in ServerScriptService, it’s still not working right.

Do you really have to use Server Script?
try LocalScript and put it under playerscripts or playercharacter or startergui

It still doesn’t work, I’ve tried putting it in a localscript, in a normal script and changing its location, but it still doesn’t work.

Do you have any other script, that might be causing this problem with camera?

Just asking if you put the camera in a local script did you disable the camera in serverscript?