Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

The Value returns 0 NO MATTER WHAT?

Asked by 3 years ago
Edited 3 years ago

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

0
Are you reading the datastore and/or changing the value in a local script or a normal script? MrOinkerzYT 87 — 3y
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 SquadPr0 0 — 3y

Answer this question