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

Why is my datastore not getting the data?

Asked by 5 years ago

I'm sorry, I'm new to DataStores.

01local DataStoreService = game:GetService("DataStoreService")
02 
03local myDataStore = DataStoreService:GetDataStore("DATA")
04 
05game.Players.PlayerAdded:Connect(function(player)
06    local leaderstats = Instance.new("Folder", player)
07    leaderstats.Name = "leaderstats"
08 
09    local tokens = Instance.new("IntValue", leaderstats)
10    tokens.Name = "Tokens"
11    tokens.Value = 0
12 
13    local data
14 
15    local success, errormessage pcall(function()
View all 40 lines...
0
I've already enabled API services. AcrylixDev 119 — 5y

1 answer

Log in to vote
1
Answered by
ImTrev 344 Moderation Voter
5 years ago

I only looked at it for a second but I saw on line 15 you forgot an "=".

Ad

Answer this question