I have made a script where once the player clicks "Play" on the menu, it makes the menu disappear and locks him in first person (Like in Phantom Forces, kind of.) The only problem I have with this script is that when the player dies, he is still locked into first person and is unable to click any of the buttons. Here is my script so far:
script.Parent.MouseButton1Down:connect(function()
bin = script.Parent
function Clicked()
bin.Parent.Visible = false
end
bin.MouseButton1Down:connect(Clicked)
game.Players.LocalPlayer.CameraMaxZoomDistance = .5
end)
bin = script.Parent
function Clicked()
bin.Parent.Visible = false
end
bin.MouseButton1Down:connect(Clicked)
I want it so that when the player dies, he will be unlocked from first person to freely move around the menu.

6 comments
Also, your script looks a little strange. Is it working in the first place?
I tested it in studio and it works. I should test it on the site itself. And where would I put your code in my script?
Anywhere in the script is fine, it fires whenever the humanoid's health reaches 0.
Alright. I'll let you know if anything goes wrong.
Good news, it works. Thanks very much dude.
No problem.