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) game.Players.LocalPlayer.Character.Humanoid.Died:connect(function() game.Players.LocalPlayer.CameraMaxZoomDistance = 20 end)
It's supposed to lock the player in first person when he clicks the "Play" button and make the menu disappear. The menu disappears, but the player is not locked in first person. Is there anything I can do to fix this script?
Make sure it's in the proper script, in that case try to put it in a 'LocalScript' if it is already then go to number 2.
When you're In - Game try pressing F9 to open the console and you'll see the error there. if you're having problem with the "Character" then try
player = game.Players.LocalPlayer repeat wait() until player.Character ~= nil -- scripts --ends