Hello, I’m making a fps game with Tiers like other games with ranked mode.(LoL, Valorant, BedWars, etc)
So how do I create a Ranking System like this? for example:
Player get assigned in a tier(gold, platinum, diamond…) and If a player beats a better player after the game, the player’s rank goes up a lot, and If the player loses to a worse player, rank goes down. but I have no ideas. how to make this??
local plr = game.Players
local kills = Instance.new("IntValue")
kills.Name = "Whydididothis"
local diamondtier = Instance.new("Folder")
local goldtier = Instance.new("Folder")
tiers{diamondtier,goldtier,platinumtier}
if plr kills == > 150 --i dont have studio opened
print(goldtier)
plr.Teams.goldtier = true
This script is completely wrong you messed up in many ways like forgetting an end and using the infamous == > method (it’s =>), not setting instance parents, calling variables in unknown ways, and more… I can’t write a script cuz I’m in school but I’ll reply later today if nobody does lol
local Players = game:GetService("Players")
local function updatePlayerTier(player)
if player:FindFirstChild("leaderstats") and player.leaderstats:FindFirstChild("kills") then
local killCount = player.leaderstats.kills.Value
if killCount >= 150 then
local goldTier = game.Teams:FindFirstChild("goldTier")
if goldTier then
player.Team = goldTier
-- Maybe send a notification to them? Like, game.ReplicatedStorage.LevelledUp:fireClient(player)
local event = Instance.new("RemoteEvent")
event:FireClient()
end
end
elseif not player:FindFirstChild("leaderstats") or not player.leaderstats:FindFirstChild("Kills") then
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local kills = Instance.new("NumberValue", leaderstats)
kills.Name = "Kills"
end
end
Players.PlayerAdded:Connect(function(player)
updatePlayerTier(player)
end)
for i, Player in pairs(Players:GetPlayers()) do
if Player:FindFirstChild("leaderstats") and Player.leaderstats:FindFirstChild("kills") then
Player.leaderstats.kills.Changed:Connect(function()
updatePlayerTier(Player)
end)
end
end
I think that this question should go into game design, but whatever.
There are many types of ranked matchmaking systems. Some are better, some are more casual, some are completely broken, and some don’t even have a meaning; you are just globally ranked on some leaderboard, and that’s it.
The games you refer to use the most common “ELO” system. Most commonly, it is split into several rank categories; the higher your “elo,” the higher your skill. It starts low; with every win, you get more points depending on how you did that match; if you get a lot of kills, you get more as a bonus. If you lose the game completely, then you lose Elo. Higher ranks tend to have bigger multipliers of losses, so it is harder for people to maintain them. This isn’t the most ideal system if implemented bare bones since “smurfing” exists where high-ranked players play in low-elo matches. You can even implement your own ranking system if you want; you just need some imagination. I like the weighting system more, which can be seen in most rhythm games like osu! That is simply based on your rank being a sum of your best scores. For FPS shooters or other strategic games, it really isn’t something that works from a community perspective. Also keep in mind that making a properly balanced ranking system is quite hard and will require a lot of complex algorithms to calculate the player’s rank fairly.
Again, I think this should go into game design since scripting support means if you have an issue with a particular script you made, it’s not really just to get free code. Try to build something from scratch yourself and see how that would work. I mean, if you don’t know how to script, then learn it; no one can actually help you script it, as that would be spoon-feeding. There are many resources online on how these algorithms work, so you shouldn’t have trouble making them. Good luck and happy coding!