Player Scripts Not A Valid Member Of Player

local upgrades = game.Players:FindFirstChild(player.Name).PlayerScripts:WaitForChild('UpgradesIntValue')

17:05:54.438 - PlayerScripts is not a valid member of Player

How is player scripts not a valid member of player? Am I not calling it correctly?

This has been asked many times before. The PlayerScripts folder is created locally. You can’t get it from the server. Use a LocalScript or move UpgradesIntValue to somewhere the server can see.

Also game.Players:FindFirstChild(player.Name) is redundant since you already have the player???


Where do you recommend putting it? under a gui?

Put it in replicated storage, that is the main reason why remote events are able to communicate between client and server