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

My egg datastore isnt working, I tried everything, Why wont it work?

Asked by 4 years ago
Edited 4 years ago

Here is my datastore. It didnt save my data at all or print anything

01local DataStoreService = game:GetService("DataStoreService")
02local NewData = DataStoreService:GetDataStore("myDataStore")
03 
04game.Players.PlayerAdded:Connect(function(player)
05    local data = Instance.new("Folder")
06    data.Name = "data"
07    data.Parent = player
08 
09    local eggs = Instance.new("IntValue")
10    eggs.Name = "eggs"
11    eggs.Parent = data
12 
13    local info
14    local success, errormessage = pcall(function()
15        data = NewData:GetAsync(player.UserId.."-eggs")
View all 37 lines...
0
Is it printing anything? And on line 13, you can try and say local data instead of info. Then on line 19, you can say eggs.Value = data I think it is important to say data instead of info because inside the pcall you are saying data Soban06 410 — 4y

Answer this question