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)
