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

help with calling localplayer?

Asked by
s1muIate -35
6 years ago

I have looked at the other asks and saw the solution, however it does NOT work and I get the same error when trying to call localplayer! My localscript is in a gui button btw.


local players = game.Player.LocalPlayer

error: attempt to index localplayer(a nil value)

0
HELP ME s1muIate -35 — 6y
0
You forgot the "s" at the end of game.Player. The player service is plural. ScriptGuider 5640 — 6y
0
O yeah forget that I meant to put an S.... but still I dont know whats goin on... s1muIate -35 — 6y
0
you can only use `game.Players.LocalPlayer` on a LocalScript. hellmatic 1523 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

You forgot to put a S in your script it should be like this

local player = game.Players.LocalPlayer --I changed pllayers to player since this is not the whole group of people--
Ad

Answer this question