Script cant find values?

I have a script (I have tried local and not) in starter player scripts and a configuration with values inside of the player. The point is for these to hold some key stats for the player. I have tried putting them in starter character, starter character scripts and starter player scripts. For some reason my script cannot find them, giving me the error message: “(Stat) is not a valid member of Configuration”

Any fixes? Im sure im doing something wrong I just cant figure it out

1 Like

Can you show your code? I would also check if using WaitForChild solves your problem.

1 Like

Two possibilities are:

  • If the script that is getting these stats is a server script, then of course you cannot because StarterPlayerScripts can only contain LocalScripts, which don’t replicate to the server. The stats can’t be seen by the server.
  • Perhaps you placed that script somewhere where it runs before the stats are created.
1 Like

Yes I have tried this, heres the code

Top
Capture

The error happens on the last 2 lines, where I am trying to access the value from within the stats holder.

1 Like

I used wait for child, and I have checked during run time and seen them there.

What about the script that creates the stats?

There is no script, I just placed a configuration into the player that has values in them

Is the value created on the server or client?

Placed in before run time in the explorer, not sure if thats client or server side or either

Huh you cant just do that right?
Make a script on the server thats add the values to each player.

Can you send a screenshot of the hiearchy in the explorer

1 Like

Just attempted this, gave the same result.

Pretty cluttered and full, any specific part you want?

“(Stat) is not a valid member of Configuration”
Very weird error, there is no part in the script with the name stat

That is just a placeholder lol, it will say armor or speed or whatever other stat name I have, for that code it says armor since thats the first stat shown

Oh my bad lol
Send the whole hierarchy please

I cant even fit the whole hierarchy, any part you need, player at runtime player scripts etc?

Just the values from the configuration you mentioned

image_2025-02-27_143203426
They are now in the player as I did the method you mentioned of a script and assigning them there, the original script has been updated for that

Very weird huhuhuhhhuhhhahahah