Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What script should I use to lock and unlock first person?

Asked by 6 years ago

I want to make a script that every time someone equips a tool I want to lock first person and every time someone unequips it to return back to normal. What code should I use?

1 answer

Log in to vote
0
Answered by 6 years ago

If you want a player to go first person when they join the game you could put in this

game.Players.PlayerAdded:connect(function(player)
    wait(1) --wait in case there is lag
    player.CameraMaxZoomDistance = 0 --forces the player to go first person
 end)

If you want it to be changable, you could make a script in starter player that if a certain event happens in the game it uses the script above to change the player to first person.

0
I want to be changeable and when it is not happening back to normal panoskik 0 — 6y
Ad

Answer this question