The following lines of code are snipped from the original script.
The code fires when a new player joins the game. It is located within a Server-Sided script.
local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local cash = Instance.new("NumberValue") cash.Name = "Cash" cash.Value = usercashpath cash.Parent = leaderstats
The problem is, the leaderstats folder is not created into the player.
I figured out the issue, i was using FindFirstChild(), instead of :WaitForChild for usercashpath value.