Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How to put on LockFirstPerson

Asked by 10 years ago

Some FPS have LockFirstPerson. It looks cool. I wanna know hot to make LockFirstPerson where they are in FirstPerson and they can't get out.

5 answers

Log in to vote
1
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago
--You can lock a Player's camera with the CameraMode property.
--Put this in a LocalScript in StarterGui or StarterPack

repeat wait() until game.Players.LocalPlayer
local p = game.Players.LocalPlayer
p.CameraMode = "LockFirstPerson"
Ad
Log in to vote
0
Answered by
nate890 495 Moderation Voter
10 years ago

Take a look at my answer on this here post.

Put the following code inside a LocalScript and put it into StartPack or StarterGui.

local player = game.Players.LocalPlayer

player.CameraMode = Enum.CameraMode.Classic
wait()
player.CameraMode = Enum.CameraMode.LockFirstPerson
Log in to vote
0
Answered by 10 years ago

Utilize a respawn script, and put in a line of code similiar to

game.Workspace.Camera.CameraMode = Enum.CameraMode.LockFirstPerson

(Note: It HAS to be a LocalScript, perhaps a LocalScript in StarterGear?)

Log in to vote
0
Answered by 10 years ago

[Nate890] It only works if I put it in both but it works :D.

Log in to vote
0
Answered by
woodengop 1134 Moderation Voter
10 years ago

Open Script and put this down

game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        if plr and char then
            plr.CameraMaxZoomDistance = 0.5
            plr.CameraMinZoomDistance = 0.5
        end
    end)
end)

Answer this question