Help With Save Data Script

You can write your topic however you want, but you need to answer these questions:
Hi, im trying to get data to save on my game but the only tutorials i can find are out of date and not working.

i have tried so many scripts but nothing works! please can someone give me the script to save data for my game.

if you need it the leaderstats i want to save are “points” and “Prestige”

thanks guys!

well :

There is a much easier, and fresh looking version of a datastore script.

Here is an example:

local DataStore = game:GetService('DataStoreService')

local myDS = DataStore:GetDataStore("YourDataForMarketsOrSomethingElse")

-- Set Data
myDS:SetAsync("Key", --[[Value here]] {1, 2, 3, "Blah blah blah", a = 1, b = 2}) -- Value can be whatever you want it to be, a table, a number, a bool, or a string.

-- Get Data
myDS:GetAsync("MoneyStored")

More info here: Data Stores (roblox.com)

BE SURE TO ENABLE IT IN STUDIO