I made a Local Script inside the StarterGui, with the following line inside:
game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
game.StarterGui:SetCoreGuiEnabled("All", false)
The problem is that in online mode, the player is not locked in First Person view, however the 2nd line (game.StarterGui:SetCoreGuiEnabled("All", false)) works just fine. How come in offline mode, the Camera is locked on first person, but on online mode it isnt?

1 comment
Also, there are times that even the above may not work, say if a player has a slow computer. If you still have issues at times, think about using WaitForChild() on LocalPlayer -- it works just like FindFirstChild(), but waits until the child named is there rather than erroring.