I have tried many scripts on this site but there wasent any for when the player clicks a gui. Or I just dint see one. Please help.
Each player has a property named CameraMode which holds an enum, either Classic or LockFirstPerson.
You can use the MouseButton1Click event of a GuiButton in order to toggle or set the CameraMode when the player clicks on the Gui.
local player = game.Players.LocalPlayer local gui = GUI_BUTTON gui.MouseButton1Click:connect(function() if player.CameraMode == Enum.CameraMode.Classic then player.CameraMode = Enum.CameraMode.LockFirstPerson else player.CameraMode = Enum.CameraMode.Classic end end)
Locked by User#19524
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?