Could you try printing the error for better clarification of what going wrong? (which in your script is represented as a variable “err” )
Adjust your pcall “callback” function like so:
if success then
print("Save Success") print(Datastore:GetAsync(player.UserId)) -- Print that the save was successful and also print the table saved.
elseif not success then
warn("An Error occurred saving DataStore:")
print(err) -- Print that the save was unsuccessful and also print the error caused from saving the data.
Also, something that seems to slip my mind just about every time. You have to set the script “RunContext” or something like that in properties to run on the Server side not legacy or client(local). That should allow you to actually save to the server.
i prefer you to use profileservice to prevent any kind of error . ITS VERY EASY TO USE once you understand . and u Profile-Service-Guide.rbxl (67.4 KB)
dont have to care bout error anymore ( if you follow step by step )