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

Local player is a nil value?

Asked by 5 years ago

I want the players face to change mid game but it won't work. i put my script in the workspace.


wait(3) game.Players.LocalPlayer.Character.Head.face.Texture = "rbxassetid://1612075567"

0
you have to put the script in a local script. TheRealPotatoChips 793 — 5y
0
I did it but it still won't give the texture ScriptToon 70 — 5y
0
Try placing it in the StarterPlayer>StarterCharacterScripts climethestair 1663 — 5y
0
Oh wow it worked thank you! ScriptToon 70 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

You cannot access the Local Player through the workspace, nor can you access the Local Player with a Server Script unless you're sending a parameter or argument through firing an event.

If this is a Local Script you're writing this in, I suggest you move it to something like StarterPlayer or StarterPack. (StarterGUI works as well.)

If this is a Server Script, rewrite it in a Local, and move it to one of the designated areas above.

Best of luck in your future endeavors!

Ad

Answer this question