Ranking System without group

Hello, I am searching a solution for a ranking system made without a group, trainers should be able to rank up trainees and this should be something that more games can adopt (like Training Center and Main Game). This would be needed to provide an overhead UI with the rank displayed and a team service (LR-MR-HR).
Thank you in advance for any solution

1 Like

You can make it without the groups.

The problem is how? I don’t know scripting that much

1 Like

You can store ranks in a datastore

2 Likes

You can use billboard ui’s to display ranks overhead, You can use string values to store ranks. You can make a panel to give ranks( or smthing)

Hello,

As @TenBlocke said you’ll need to use Data Stores. You could use something like the following,

--// Ranks, make them whatever you want.
local RANKS = {

	LR = 1,
	MR = 2,
	HR = 3

}

--// Creating a datastore for Ranks.

local DataStoreService = game:GetService("DataStoreService")
local DATA_KEY = "RANK_DATA"

--// When the player joins a IntValue is created with Rank data. If there is no previous data they are ranked to LR.
game.Players.PlayerAdded:Connect(function(Player)
	local RANK_DATA = DataStoreService:GetDataStore(DATA_KEY)
	
	local RANK_STORE = Instance.new("IntValue")
	RANK_STORE.Name = "PLAYER_RANK" --// The Player's Rank is stored as a number within the player.
	RANK_STORE.Parent = Player
	
	local DATA
	local SUCCESS, ERROR = pcall(function()
		DATA = RANK_DATA:GetAsync(Player.UserId .. DATA_KEY)
	end)
	
	if SUCCESS then
		if SUCCESS ~= nil then
			RANK_STORE.Value = DATA
		else
			RANK_STORE.Value = RANKS.LR
			
		end
		
	elseif ERROR then
		error(ERROR, 1)

	end
	
end)

--// When a player leaves their data is saved.
game.Players.PlayerRemoving:Connect(function(Player)
	local RANK_DATA = DataStoreService:GetDataStore(DATA_KEY)
	
	local SUCCESS, ERROR = pcall(function()
		RANK_DATA:SetAsync(Player.UserId .. DATA_KEY, Player:FindFirstChild("PLAYER_RANK").Value)
	end)

	if not SUCCESS then
		error(ERROR, 1)

	end
	
end)

If you want to learn more about Data Stores you can do so here.

I wasn’t sure how you wanted trainers to rank others up, but here is a pretty basic function you can use,

local function SET_RANK(RANKING_PLAYER, PLAYER_TO_RANK, RANK)
	if RANKING_PLAYER:WaitForChild("PLAYER_RANK").Value >= RANKS.HR then --// Checking if the player who is trying to rank is a HR.
		PLAYER_TO_RANK:WaitForChild("PLAYER_RANK").Value = RANK --// Changes the Player's Rank.
		
	else
		warn(RANKING_PLAYER, "isn't a high enough rank!")
		
	end
	
end

If you want to make chat commands I suggest you read this post.

Making an overhead UI is pretty simple. There are a bunch of Youtube tutorials, here is a decent one I found.

1 Like

Like Decablocks and Boomkd44 said, you can use a datastore to save the ranks. To get the overhead UI, you can just make a billboard GUI and place it in ServerStorage, then clone it into the players character once they have loaded.

There’s lots of ways to go around doing this.

1 Like