Hello. I am making a fighting game so obviously there should be a kill leaderboard in the top right corner. But I don’t even know the first thing about how to make a leaderboard.
What I want is a “Kills”, “Wins”, and “Coins” Leaderboard with the “Wins” determining the placement on the playerlist (determining if you belong in the lowest or highest part in the playerlist).
If you can script the “Kills” Leaderboard to actually make it take kills AND BE ABLE TO SAVE…Thank heaven if you do that It would be very much appreciated by me. But this is a side problem that may get bigger later so dont worry about it
-- This must be named leaderstats in order to work
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = "leaderstats"
local Money = Instance.new("IntValue")
Money.Name = "Money"
Money.Parent = leaderstats
-- Replace money with whatever you want it to be
For every time a player has their character added/respawned you would want to look for their Humanoid object and listen for the Died event. If you’re using tools that have common scripts like swords then this should be easy to implement.
When a character receives damage from a tool that uses these common scripts a object is created called “creator” which is a ObjectValue where the Value is the player that has given the damage.