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)
script.Parent.MouseButton1Down:connect(function() game.Players.LocalPlayer.CameraMaxZoomDistance = .5 end)
thie is for a gui
script.Parent.Touched(function(hit) game.Players.LocalPlayer.CameraMaxZoomDistance = 400 end)
try using something like this for the zoom. to get it back when they die, google ondeath()
Setting Player.CameraMode
to Enum.CameraMode.LockFirstPerson
should work.