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

Datastore is not saving data? [PLEASE HELP]

Asked by 4 years ago
Edited 4 years ago

Hey guys, im having an issue with my datastore. So i plan on saving alot of data, and i want to do it on one key, the player UserId. To do this, i make a table and use Http Service to encode and decode it (which works, i tested it), but it appears it does not save correctly. Here is the code:

01-- [ SERVICES ] --
02local Players = game:GetService("Players")
03local DataStoreService = game:GetService("DataStoreService")
04local Http = game:GetService("HttpService")
05 
06-- [ DATASTORES ] --
07local Data = DataStoreService:GetDataStore("Data")
08 
09Players.PlayerAdded:Connect(function(Player)
10    -- Leaderboard
11    local leaderstats = Instance.new("Folder")
12    leaderstats.Name = "leaderstats"
13    leaderstats.Parent = Player
14    -- Coins
15    local Coins = Instance.new("IntValue")
View all 92 lines...
0
There was a similar question for about 40 minutes ago, make sure that the game isn't shutting down when you detect `PlayerRemoving` NotTheChara 191 — 4y
0
ok lemme try that iamtryingtofindname 22 — 4y
0
nope didnt work still iamtryingtofindname 22 — 4y
0
Umm, why do you need to encode and decode the Data? NotTheChara 191 — 4y
0
so i can store a bunch of values into one key to keep stuff more organized iamtryingtofindname 22 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

You don't need HttpService to save Data using Leaderstats, if I were you watch this video; https://www.youtube.com/watch?v=DkYupSBUpes

I would give you the code but apparently spoonfeeding isn't allowed on Scripting Helpers!

Good Luck, have a good day! (also mark this as solved if it worked)

0
well i know i dont have to use http service but i want to because im saving alot of data and its faster with alot of data iamtryingtofindname 22 — 4y
Ad

Answer this question