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

Yeah I already asked this but I need more help .-. anyone?

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. view source

local players = game.Players.LocalPlayer

error: attempt to index localplayer(a nil value)

also thanks to scriptguider for pointing something out!

0
Not sure if this is the issue, but you have to wait for your player to be loaded. This included the model, scripts, guis, etc... before that line if you wait for the character to load it might help sonicfan0405 18 — 6y
0
the script has a gui button so the character is already loaded.... thx anyway! s1muIate -35 — 6y
0
local Player = game:GetService("Players").LocalPlayer; Zafirua 1348 — 6y
0
hmm I will try that! s1muIate -35 — 6y
0
THANK YOU SOOO MUCH I HAVE BEEN SOOO IRRITATED BY THIS! s1muIate -35 — 6y

1 answer

Log in to vote
0
Answered by
s1muIate -35
6 years ago

REPOST FROM ZAFIRUA CREDIT FOR SOLVING IT

local Player = game:GetService("Players").LocalPlayer

Ad

Answer this question