Script cant find values?

Whats the exact error? (picture please)

My exact thought lol, probably just going to take a break and come back to it, im sure theres something missing


This is when its in the character, when its in the player it will say the same thing but with Players.GoatTatum.PlayerStats

Are your values created before your removing function?
I would add a task.wait(1) to the original script and move the playerstat value creation to a different script

The creation is in a separate serverscriptservice script, and yes it is created before I also used waitforchild to make sure, and this function doesnt run right away, I do a few things in runtime before it happens.

well i have no ideas anymore i am sorry :frowning:

All good lol, I’m asking for help I got no ideas either

i dont know if you want to, but sharing the whole place might help but i cant acces studio right now

I have closed studio and am taking a break, but yeah I wouldn’t want to haha I appreciate the willingness to help though

No problem, have a nice day/ evening!

1 Like

I think I found your issue, you’re checking “PlayerStats” in your character instead of player. From what i’ve seen with your explorer screen shot after.

Basically Remove Character in your script.

1 Like

Sorry that screenshot of the explorer came after I made changes requested from other replies, the original code screenshots were when the stats were in the character haha, it gives no changes in the error code when I change between character/player

Well could be either two things. Client hasn’t loaded the Value Instance inside the configuration or you’re giving it the wrong location. Other than that I can’t help with the lack of info on where what is.

Did you try this:

local character
repeat
character = player.Character
until character

This make sures the character isnt nil, since if its in starterplayerscripts it might not get the character all the time.

Not at studio right now, but I did move to using the player to hold these rather than the character. I will try this when I am back though

What info do you lack? I am happy to provide pretty much anything although I cant get new screenshots right now

Just that earlier you stated that you’ve changed things, such as location of the configuration. So I’m kinda lost rn.

Maybe also try using WaitForChild() on the armor value?

This might do the trick: statsHolder = player:WaitForChild("PlayerStats", 5)

The config is now spawned in the player through a script in serverscriptservice. It contains a few integer values and my script picks up on the configuration, but not the values.