Hello, I’m doing a rank-up system, I’d like to know what’s the best way to do it.
The rank-up system I’m going to create is that if my team is red then I’ll be able to rank-up on other players, the other teams will be yellow and green. Only and exclusively if I’m in a red team, I’ll be able to rank up other players.
With rank-up I mean that if the player is in the yellow team and I do rank-up he will go up to red and the same with the green team.
I would like to know what is the best way to do this since I plan to do it with 11 different teams and it will be a lot of code, what ideas could you guys give me or suggest?
I am open to your sample codes, I will really appreciate your feedback and help, thank you all.
You can create a dictionary which gives each team name some value to represent the hierarchy of order they’re in so like [“Red”] = 10, [“Blue”] = 9, that way when you rank up, you can check if they are eligible for a rank up, or they are too high of a rank to keep ranking up. If they are at 9, you can set their team to read, you can also do like [“Blue”] = {9, “Red”}; 9 is their current order rank, Red is the next rank they will receive if you rank them up, overall it’d be like [“Head Chef 500”] = {2, Supervisor}, etc…
I think I know a way but for that, you would have to use a leaderstats script. I’m not sure if this is exactly what you wanted but by a leaderstats script I mean that it should show the players name then the name of the rank that they are in. Example: AAD232007 - Player,
Somebody - Moderator. If this works then let me know and I can show you how to make that. Also, it will use a GUI that only shows for players that have a specific rank and using that GUI, the player can changer others’ ranks.
I understand, well I have this code that I made and the truth is I would like to change the player’s team, how can I take the value of the table and assign it to the player that was written in the chat?
local Teams = game:GetService("Teams")
local Admins = Instance.new("Team", Teams)
Admins.TeamColor = BrickColor.new("Lapis")
Admins.AutoAssignable = false
Admins.Name = "Admin"
local noAdmins = Instance.new("Team", Teams)
noAdmins.TeamColor = BrickColor.new("Cyan")
noAdmins.AutoAssignable = false
noAdmins.Name = "No Admins"
local newJoined = Instance.new("Team", Teams)
newJoined.TeamColor = BrickColor.new("White")
newJoined.AutoAssignable = true
newJoined.Name = "Newbies"
local teamOrder = {
[1] = Admins,
[2] = noAdmins,
[3] = newJoined
}
local Players = game:GetService("Players")
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(message)
if plr.TeamColor == BrickColor.new("Lapis") or plr.TeamColor == BrickColor.new("Cyan") then
for i,Player2 in pairs(Players:GetPlayers()) do
if message == '.Rank ' .. Player2.Name then
print(Player2.Name.." Team changed")
-- change player team here:
end
end
end
end)
end)