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

Problem with game.Players.LocalPlayer, Help?

Asked by 5 years ago

After the Maintenance. I opened up Roblox Studio to edit the scripts and some of my scripts aren't working? I fixed each of them and nothing works. It says an error that it is a nil value.

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

This even don't work. I tried some replacements and nothing can fix it. I need help?

0
What tip of script do you used? HaveASip 494 — 5y
0
what script are you using? normal, local, module? LoganboyInCO 150 — 5y
0
Script and local cherrythetree 130 — 5y

1 answer

Log in to vote
0
Answered by
gullet 471 Moderation Voter
5 years ago
Edited 5 years ago

If you're running the code in a normal (server) script it's because the server have no player, and in turn there is no local player. It can only be used in local (client) scripts.

Ad

Answer this question