I have been trying to work this out myself all day since about 11 AM and its 8PM....

no matter what this returns 0

for i,v in pairs(game.Players:GetChildren()) do
		
		print(v.Name)
		print(v:WaitForChild("leaderstats").Cash.Value)
		
		
		
	end

I have a datastore load when player joins but this is going to save it but I have no issue loading the Values (I have tested using the Datastore editor and creating a value manually with my UserId.) But the problem comes when accessing the Cash.Value which is in the leaderstats folder under player... It prints out this each time

19:53:57.786 SquadPr0 - Server - Script:44 19:53:57.786 Cash: 0 - Server - Script:45

2 comments

0

Are you reading the datastore and/or changing the value in a local script or a normal script?

0

I am doing the datastore in a regualr script in the scriptservice, then doing the changing of the values in a local script.. but now I changed it to remote events and it has been working but it takes alot of time to add each feature now haha