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

Datastore script not loading/saving data with HTTP service?

Asked by 4 years ago
Edited 4 years ago

Ive been at this all day, and there are no errors, it just doesnt load/save. (Im not sure which one). Btw i use http service because it is easier and faster to save alot of data, in the future.

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 73 lines...

1 answer

Log in to vote
0
Answered by 4 years ago

Alright, so first off you don't want to save data with HTTP, simply because data is different when you're saving with HTTP. It's also a weird way to save it. If you want to end something to chat logs with a webhook go ahead and do HTTP:JSONEncode(webhook, datasaved) and it will send the data that got saved, obviously you have to set that up but for a data store,just use DS and Set/Get Async(). I recommend just keeping DS to be honest.

Ad

Answer this question