Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

is there anything wrong about my script only 1 currency appear?

what is wrong about my script because when i play it only appear "second" on the leaderboard

local DataStoreService = game:GetService("DataStoreService") local seconddata = DataStoreService:GetDataStore("Money") local kronosdata = DataStoreService:GetDataStore("Kronos") local torbdata = DataStoreService:GetDataStore("Torb") local rankdata = DataStoreService:GetDataStore("Rank")

game.Players.PlayerAdded:Connect(function(Player) local Leaderstats = Instance.new("Folder") -- Leaderboard Leaderstats.Name = "leaderstats" Leaderstats.Parent = Player

local Currency = Instance.new("IntValue") -- Money
Currency.Name = "Second" 
Currency.Value = seconddata:GetAsync(Player.UserId) or "0"
Currency.Parent = Leaderstats

local Kronos = Instance.new("IntValue") -- Swing
Kronos.Name = "Kronos"
Kronos.Value = kronosdata:GetAsyns(Player.UserId) or "0"
Kronos.Parent = Leaderstats

local Torb = Instance.new("IntValue") -- Torb
Torb.Name = "Torb"
Torb.Value = torbdata:GetAsyns(Player.UserId) or "0"
Torb.Parent = Leaderstats

local Rank = Instance.new("StringValue") -- Rank
Rank.Name = "Rank"
Rank.Value = rankdata:GetAsync(Player.UserId) or "Mortal"
Rank.Parent = Leaderstats

end)

game.Players.PlayerRemoving:Connect(function(Player) seconddata:SetAsync(Player.UserId, Player.leaderstats.Currency.Value) kronosdata:SetAsync(Player.UserId, Player.leaderstats.Kronos.Value) torbdata:SetAsync(Player.UserId, Player.leaderstats.Torb.Value) rankdata:SetAsync(Player.UserId, Player.leaderstats.Rank.Value) end)

1 answer

✓ Accepted answer

Hi, no there is nothing wrong with your script. Roblox only allows one value to be on screen

This discussion is preserved as it was. New answers, comments, and votes are closed.