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

How do you force First Person Mode?

Asked by
IcyEvil 260 Moderation Voter
10 years ago

I am trying to force first Person mode for a game of mine and I dont even know where to start, please I need some help.

1 answer

Log in to vote
0
Answered by
istiyak 13
10 years ago
script.Parent.Parent.CameraMode = Enum.CameraMode.LockFirstPerson--- put in starter GUI!

or:

--First Person Camera
--by Ozzypig, June 2012.

function onPlayerSpawned(player, character)
    player.CameraMode = "LockFirstPerson"
end

function onPlayerChatted(player, message, recipient)
    if player.userId == game.CreatorId and game.CreatorType == Enum.CreatorType.User then
        if message == "/thirdperson" then
            player.CameraMode = "Classic"
        elseif message == "/firstperson" then
            player.CameraMode = "LockFirstPerson"
        end
    end
end

function onPlayerEntered(player)
    player.CharacterAdded:connect(function (char) onPlayerSpawned(player, char) end)
    player.Chatted:connect(function (msg, rec) onPlayerChatted(player, msg, rec) end)

    player.CameraMode = "LockFirstPerson"
end

game.Players.PlayerAdded:connect(onPlayerEntered)


NOT MADE BY ME!!!!!!!!

Ad

Answer this question