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?
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.