Roblox Player Data Saves

To start, I am very new to scripting, and have only been doing it for about a week, but I have run into a problem when it came to saving player data. I know this question is asked a lot, but this is a more specific issue. This script in in ServerScriptService, api is enabled, and the game is published. There is nothing in the console for some reason. Here is a screenshot

You should probably also implement a print() statement for when the data does successfully save in your onPlayerExit function?

Making a folder inside a player strictly must be named “leaderstats” so it can make a built in leaderboard for all the values inside the folder.

You dont need to connect functions into events, you can just do the player added/removing and add the script inside it (either way works fine)

sorry it will take me a little bit to reply because i have to publish the game, and since i can only update a game one a week, i have to create a new one, so it may take me a bit, so do not think i am ignoring you guys, and thanks for the help

Data does not save in studio unfortunately using normal DataStores

ok so i just did it and it still does not work even though when i do it through roblox studio, but that was only the onPlayerExit function, so im guessing there is something wrong with the onPlayerAdd part of the script, here is the new screenshot

sorry, wrong screenshot, here is the right one

yes, but i do publish the game when i test it, and play it on the roblox website, so that should not be a problem

what are those warning errors? I think it maybe related to your problem

i do not know what those errors are for, that was only when i ran it in studio, but api access is on

image

seems like it couldn’t publish your api setting configuration

ok, i will publish the game again as a different game to see if that works, give me a little bit to reply, thx

so i saved this file and restarted roblox studio because it kept displaying the error, and it did not display this error, but i published and enabled api and everything, but it still did not work, the script has not changed since the last photo