Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How and Why is the Value "Needs" not found in the Player when it is clearly there?

I am trying to access the value "Needs" in a regular script from the player like this.

local char = tool.Parent
local player = game.Players:GetPlayerFromCharacter(char)
local needs = player.Needs

Error in output: "Needs is not a valid member of Player"

Anybody know why this error keeps happening? I even tried to do a :WaitForChild() but it then says there's an infinite yield trying to find "Needs." Needs has been inputted into the player yet the server still cannot find it.

3 comments

0

What is the script adding "Needs" to the member player?

0

It's not adding anything, "Needs" is the parent of multiple values. I'm trying to access needs so I can access the values in it but apparently it cannot find "Needs."

0

Include more detail, put in all of the lines of code in the script.

1 answer

Are you using the leaderstats to be a localscript? You cannot do that as local can only be seen from the localside. Reply to this message with your response and I will redo this comment. Also please put your full script so we can check if its a lower script issue.

This discussion is preserved as it was. New answers, comments, and votes are closed.