✓ Accepted answer
As stated by Fattycat, it should indeed be ran through a localscript, otherwise it will only work in solo mode. However, earlier I was playing with CameraMode (see this thread) and came across a very unique problem- the CameraMode didn't want to change when the code was ran for the second time (only successfully changing the CameraMode when the player joined, not upon reset.)
This being said, there is a solution to this rather annoying CameraMode issue, and the solution was posted on the thread that I linked earler (it's the last post on the thread.) The solution is to simply change the CameraMode value to "Classic" and then to "LockFirstPerson."
If you want to force first person upon entering and resetting, put the following code in a LocalScript and insert the LocalScript into game.StarterPack or game.StarterGui.
local player = game.Players.LocalPlayer
player.CameraMode = Enum.CameraMode.Classic
wait()
player.CameraMode = Enum.CameraMode.LockFirstPerson
Hope this helps. Feel free to leave a comment if it didn't.
3 comments
Unfortunately, this script did not seem to work. Tried with the local script in both starterpack and startergui, but it did not make any difference.
Try it now
It works beautifully! Thank you so very much!