Hello, Im trying to make first person camera script ontouch, but don't work. Please help me with it.
function OnTouch()
local player = game.Players.LocalPlayer
player.CameraMode = 0
wait()
player.CameraMode = 1
end
script.Parent.Touched:connect(OnTouch)

2 comments
If i put it to StarterGui works fine, but then i can't click another guis.
In order to click other GUIs in first person, you need to use the Modal property of a GuiObject (E.G: TextLabel, TextButton, etc.) Note that the mouse will be unlocked until the Modal property is false or if the GuiObject is not visible.