I am currently working on a menu GUI for my FPS (Design going well). In games like Phantom Forces, you can freely scroll around (being able to customize your weapon and such) until you click play, where it locks your player in first person until you die. I already have a code for making the menu disappear when you click play (it works), but how do I lock the player into first person once he does that?
This is the code for making the menu disappear when you click play, considering you guys might have wanted to see my progress with it.
bin = script.Parent
function Clicked()
bin.Parent.Visible = false
end
bin.MouseButton1Down:connect(Clicked)

13 comments
Should I put this in the same script that I showed before? Or seperate?
just put this into your button. add other script under the mouse button1down
Add the other script under line 3 or under line 1?
under line one. line one is the function. when it fires, it triggers all the stuff between it and the end).
Alright. I'm going to bed. If it doesn't work I'll hit you up either here or on Roblox.
k
Hi, theCJarmy7. Yesterday I asked for help on Scripting Helpers and you gave me this code: script.Parent.MouseButton1Down:connect(function() game.Players.LocalPlayer.CameraMaxZoomDistance = .5 end) And well, it worked. The only problem that I had with this was when I reset my character, it didn't go out of first person mode. I will show you the script now, and maybe you can improve upon it? sc
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)
edited my answer, look at it now
Where should I put that edit you made in my script?
what edit?
You said you edited the script.
i edited my answer