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

How do I keep players in 1st person?

Asked by 10 years ago

Where it is zoomed all the way in and stays there.

Examples: Murder/Murder Mystery

6 answers

Log in to vote
1
Answered by
Hybric 271 Moderation Voter
10 years ago

Incorrect to all, I REALLY RECOMMEND that:

  1. FIRST, put a script into the StarterPack in the studio then, Paste this into the script!:

while true do wait(0.5) script.Parent.Parent.CameraMode = "LockFirstPerson" end

0
IT HAS TO BE A LOCALSCRIPT Hybric 271 — 10y
Ad
Log in to vote
0
Answered by
reaper5 10
10 years ago
game.Players.reaper5.CameraMode = 1

If you found this useful please choose it as the correct answer.

0
That was a fast answer, and thank you, I will try it. Alyssall 0 — 10y
Log in to vote
0
Answered by 10 years ago

@reaper5 just wow

That is working, it has been tested!

How do you think that this code WILL work on every PLAYER!

Create a localscript and put it into the StarterGui, we will now get the player:

local player = game.Players.LocalPlayer

Now we need to LOCK the player in FPS Mode

local player = game.Players.LocalPlayer
player.CameraMode = Enum.CameraMode.LockFirstPerson
player.Camera.FieldOfView = 55 -- Or change your FOV

That's it and reaper5 stop.

0
Okay, i'll try this also :P Alyssall 0 — 10y
0
This one works alessandro112 161 — 10y
Log in to vote
0
Answered by 10 years ago

Whenever a player enters your game(after he/she's load) he goes into 1stPerson Only.

game.Players.PlayerAdded:connect(function(player)
    if player:WaitForDataReady() then
        player.CameraMode = "LockFirstPerson"
    end
end)
Log in to vote
0
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
10 years ago

Try this, it is easier to munipulate it when say a map ends or your character dies. It must be in a local script.

--_G.FirstPersonEnabled should be modified through your main script, that way people aren't always stuck in First Person Mode.

repeat wait() until _G.FirstPersonEnabled==true
while wait() do
    if _G.FirstPersonEnabled == true and script.Parent.Parent.Character.Humanoid.Health~=0 then
        script.Parent.Parent.CameraMode = 1
    else
        script.Parent.Parent.CameraMode = 0
    end
end
Log in to vote
0
Answered by
LevelKap 114
10 years ago

--Look, you can use this:

game.Players.PlayerAdded:connect(function(player)

if player:WaitForDataReady() then

    player.CameraMode = "LockFirstPerson"

end

end)

--just know that this is roblox's built in fps camera. It is buggy.

Answer this question