i'm trying to make my tool go into first person mode on equip, and when i unequip it goes back to third person mode. Now this works but the problem is that every time the player dies hes stuck in 1st person. Help?
local p= game.Players.LocalPlayer local tool= script.Parent function equipped() wait() p.CameraMode= 1 end function unequipped() wait() p.CameraMode= 0 end tool.Equipped:connect(equipped) tool.Unequipped:connect(unequipped)
This should do it:
local p= game.Players.LocalPlayer local tool= script.Parent p.Character.Humanoid.Died:connect(function() p.CameraMode= 0 end) function equipped() wait() p.CameraMode= 1 end function unequipped() wait() p.CameraMode= 0 end tool.Equipped:connect(equipped) tool.Unequipped:connect(unequipped)