Can't use :GetAsycn() properly

I was making a datastore and I got this in the output.

image

And this is the function which gives the error. Am I doing something wrong cuz I used it a lot of times and it worked perfectly until now.

image

Did you allow Studio access to API services?

Yes I allowed Studio access to API services

Did you request the DataStore Service?

If yes did you get a DataStore? (GetDataStore)

Okay I think it was something to do with my connection or my pc or something like that since I just tested again and it worked. But thank you for trying to help

Now that I think of it, I’m pretty sure that you can’t just put in the player’s UserId. It must be Player_Id.

What I mean by this, is that you have o d this

GetAsync("Player_" .. player.UserId)

Instead of:

GetAsync(player.UserId)

If I was you, an error like this can break your script.

Use a pcall function to avoid that

This is a known issue already. I assume that this is what you’re experiencing as well.

Please refer to the following thread:

1 Like