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

I need some assistance with adding K/D to my leader board, can someone please help?

I have created a leaderboard that contains a "CASH" currency, basically a person gets cash per kill, but what I have failed to do is a add a K/D to the leaderboard as well and I am not very good at scripting and need help with adding that, if you could please guide me on how to do it I would appreciate it. Another thing I need help with is making a script that would announce a winner once the Team Death Match either reaches the total of 100 kills limit for the team or when the round timer expires and the team with the most kills wins, I would like for the game to reset the players K/D at the end of each round but, not their cash and have their cash saved for in-game purchases to buy weapons and other game related content.

my last post was removed I am assuming the moderators must've thought I was expecting/demanding people to do the script for me, but I would like some assistance with it instead. I need a guide to teach me how to do it. below is the leaderboard script I have learned to write and it works perfectly with the Cash currency.

game.Players.PlayerAdded:connect(function(player)

local folder = Instance.new("Folder") folder.Name = "leaderstats" folder.Parent = player

local cash = Instance.new("IntValue") cash.Name = "Cash" ----- Name of currency cash.Value = 0 cash.Parent = folder

player.CharacterAdded:Connect(function(character) character.Humanoid.Died:Connect(function() local tag = character.Humanoid:FindFirstChild("creator") if tag ~= nil then local player = tag.Value local bounty = 20

local leaderstats = player:WaitForChild("leaderstats")
leaderstats.Cash.Value = leaderstats.Cash.Value + bounty
   end
  end)

end) end)

1 comment

0

Add me on roblox, 'pw8g'. I'll help you. xD.

1 answer

If you're looking for a guide, the roblox wiki always works for me! Try this out https://developer.roblox.com/en-us/articles/Leaderboards

Ask me on discord if you need more help! @PoppingPopper#9649

EDIT: Erie20 corrected me, it is called the Roblox Developer Hub. (Not roblox wiki)

1 comment

0

btw its technically called the dev hub but its fine

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