Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I switch a player between first person and third person?

Hello, in my place, I want to switch players to third person when they are in a lobby, and switch them to first person when they are in a match. I am having issues doing this. For some reason, I'm only able to switch to first person using this bit of code:

	game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson

in a local script this locks their fist person, I currently have this in the start gui. Now after I set this it seems I can't revert to third person when I use this:

		game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.Classic

The only way to go back to third person so far seems to be by killing them. I'd rather not kill the player to reset their camera since it seems un-professional .

How can I switch the player from first person to third person preferably without killing them or making it seem "sloppy"?

1 answer

✓ Accepted answer

They need to scroll out.

It works only this way.

If you want to avoid it:

You'll have to change the 'CameraMinZoomDistance' at 'StarterPlayer'(game.StarterPlayer), and try setting it to 5. This will also 'force' the player not to be able to scroll into first person.

2 comments

0

hmmmm, that kinda sucks, but it's not a big deal I'll test your answer.

0

Nice, haha that worked! I need to get out of first person so people could use my gui easier

This discussion is preserved as it was. New answers, comments, and votes are closed.