Basically, I'm trying to make a first person horror game for 2021 and I've tried looking around but I found nothing related to this. Basically just a text button that forces the person to be locked in first person.
script.Parent.MouseButton1Down:Connect(function(player) --Make this pathway to your own, unless you copy my instructions on the bottom! game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson end)
If I misunderstood the question you can always reply back!
You'd put this in a LocalScript underneath your TextButton that should be under the ScreenGui that should be under StarterGui. So all in all, StarterGui > ScreenGui > TextButton > LocalScript
My script is quite similar to the other guy's, I'm not copying...
local gui = --your button gui.MouseButton1Click:Connect(function() local player = game.Players.LocalPlayer player.CameraMode = Enum.CameraMode.LockFirstPerson end)