Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

I am a noob scripter, and I need to know how to create a data save script?

Asked by 3 years ago

So, I am a noob at scripting and I have no idea how to script a data save script. But, I need one for my game.

0
you can't simply use "im noob at scripting" as an excuse to not need to any work trying to create what you wanna create, you can try searching data store service, or a youtube tutorial. NGC4637 602 — 3y
0
ugh fineeee TheStageGuyYT 19 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
01local dataStore = game:GetService("DataStoreService"):GetDataStore("MoneyData")
02 
03starterMoney = 0
04 
05 
06game.Players.PlayerAdded:Connect(function(plr)
07 
08 local leaderstats = Instance.new("Folder")
09 leaderstats.Name = "leaderstats"
10 leaderstats.Parent = plr
11 
12 local money = Instance.new("IntValue")
13 money.Name = "Money" --Put your currency
14 money.Value = dataStore:GetAsync(plr.UserId) or starterMoney
15 money.Parent = leaderstats
View all 23 lines...
Ad

Answer this question