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

Why won't this datastore give new players 100 Credits?

Asked by 8 years ago
01local DataStore = game:GetService("DataStoreService"):GetGlobalDataStore("TrustCurrency")
02 
03 
04game.Players.PlayerAdded:connect(function(plr)
05 
06    local bank = game.StarterGui.ScreenGui.Frame.Credits
07 
08    local stats = Instance.new("IntValue", plr)
09    stats.Name = "leaderstats"
10 
11    local credits = Instance.new("IntValue", stats)
12    credits.Name = "Credits"
13 
14    local key = "player-"..plr.userId
15 
View all 24 lines...

1 answer

Log in to vote
1
Answered by
thePyxi 179
8 years ago
Edited 8 years ago
01local DataStore = game:GetService("DataStoreService"):GetGlobalDataStore("TrustCurrency")
02local Repeats = game:GetService("DataStoreService"):GetGlobalDataStore("BeenThere")
03 
04game.Players.PlayerAdded:connect(function(plr)
05    local inst = Instance.new("StringValue", plr)
06    inst.Name = "Repeat"
07    inst.Value  = "No"
08 
09    local bank = game.StarterGui.ScreenGui.Frame.Credits
10 
11    local stats = Instance.new("IntValue", plr)
12    stats.Name = "leaderstats"
13 
14    local credits = Instance.new("IntValue", stats)
15    credits.Name = "Credits"
View all 32 lines...
Ad

Answer this question