Removed because I don’t want to get leaked.
First Script: Server
Second Script: Client
For some reason, the data is always nil, but if I type in the brackets at “GetAsync” directly my player name it works.
Removed because I don’t want to get leaked.
First Script: Server
Second Script: Client
For some reason, the data is always nil, but if I type in the brackets at “GetAsync” directly my player name it works.
I think you should get the player user Id and the player and put it in the brackets like (Player, UserId)
For the GetAsync(Name) and InvokeServer(PlayerName)
Idk can be wrong though.
Can we see your DataStore script?
Here is the script:
Removed because I don’t want to get leaked.
You need to save data by Player.UserId because player can change their UserId
Ok, but this doesn’t solve my problem.
Try this:
local SavedData = {SavedName = plr.Name,SavedRang = Rang, SavedOnline = LastOnline}
This would make no difference its the same as
local SavedData = {}
SavedData.PlayerName = "BuilderMan"
The problem is not saving the data. The problem is about getting the data.
Let me explain: From the Client (local script) I fire a Remote Function which gets the data in a Server script and then returns it back the local script. To specify the name, I fire the Remote Function with a property called “Name”. I get the value of the property from a textbox. The problem is that for some reason it doesn’t work with “GetAsync” if I send the Name of the player which I want to get the data from in the brackets at GetAsync via the property it doesn’t work, but If I directly type the player’s name into the brackets in the script it works.
Edit: I’ve tested it and the server script gets the value of the name property, but I think for some reason GetAsync doesn’t get the property.
Sorry for the misinformation about the table I’ve never seen somebody putting things in table like that
.
Anyways can you print the GetAsync(…) on the server so we can see if it returns a table with all the informations you need?
I found the issue. I forgot the update one of my variables. But thank you for trying to help me.