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

Need help fixing this please?

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

This is my starter script:

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

  plr.CameraMode = "LockFirstPerson" 

end) 

game.StarterGui:SetCoreGuiEnabled("Backpack", false)

Basically it's meant to force player to FP and get rid of the backpack. In solo mode on studio It works fine but doesn't work in game. Anything I'm doing wrong?

2 answers

Log in to vote
0
Answered by
Andalf 100
10 years ago

Use this

game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        plr.CameraMode = "LockFirstPerson"
    end)
end)

basically it'll only set the camera mode when the character is added to the game, because the camera is focussed on the humanoid, if you set it before the character is added it won't do anything.

0
Works in studio but doesn't seem to work otherwise, but thanks http://www.roblox.com/Gone-but-not-forgotten-In-early-stages-place?id=140812462 MrJogimico 25 — 10y
0
I tested this using studio's server but wasn't able to test it online, this should work fine... Andalf 100 — 10y
0
Are you meant to put it in a local script? Could be what i've been doing wrong..... MrJogimico 25 — 10y
Ad
Log in to vote
-2
Answered by 10 years ago

Scripts are really sensitive when it comes to correct grammar and spelling. Try using the proper capitalises.

Game.Players.PlayerAdded:connect(function(plr)

Plr.CameraMode = "LockFirstPerson"

end)

Game.StarterGui:SetCoreGuiEnabled("Backpack", false)

0
Still seems to not work. see what you think, cos I am not sure http://www.roblox.com/item.aspx?id=140812462 MrJogimico 25 — 10y
0
Completely incorrect User#11893 186 — 10y

Answer this question