Leaderstats money resetting on join

I want to get this out of the way first. I’m a builder, not a scripter. Also, the car dealership I’m using is from a youtube tutorial.

So, my problem is that when a NEW player joins the game, they are supposed to recieve $15,000. My problem is that upon leaving and rejoining after spending some money, it resets back to $15,000.

Here’s the script:
image

Here’s what happens:

Correct amount of money when joining.

Spent some money:

Rejoined:

You need to use DataStoreService to get it to save

sorry, forgot to send the screenshot of the datastore script

image

this is what my dev wrote and it has been working up until i did this car dealer


What’s the GetAsync for? Did you mean SetAsync?

1 Like

I’ll change that. My dev wrote this so I don’t know if that was a typo or not

Is there any errors in the output?

There are no errors

(char limit)

1 Like

I fixed it but it still resets my money

Try capitalizing the U for UserId (on line 4 and line 17), see if that makes any difference (im not sure if thats gonna change anything)

I helped someone with THE EXACT same script. I think that was your dev. If it was, you could ask him.

Also. Capitalise the U in “userId” to “UserId”

unfortunately that didnt fix it

the person above you suggested that and nothing changed