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

How do i get the next rank of this?

Hello, i have here a rank system, and i want to get the next rank of it, just to inform the player his next rank hes going to achieve

My rank system update system:

function updateRank(Char,Plr)
	local Ranks = {
		{"Normal Ant", 5},
		{"Experienced Ant", 9},
		{"Pro Ant", 15},
		{"Epic Ant", 19},
		{"Legendary Ant", 25},
		{"Semi-God Ant", 30},
		{"God Ant", 50},
		{"Ultra God Ant", 70},
		{"The Best Ant", 95},
		{"Titanium Ant", 125},
		{"Gold Ant", 150},
		{"Heaven Ant", 200},
	}

	if Char and Plr then
		local Gui = Char.Head.RankGui
		for NumberForRank, Rank in pairs(Ranks) do
			if Plr.leaderstats.Food.Value >= Rank[2] then 
				Gui.Rank.Text = Rank[1]
			end
		end
	end
end

1 answer

I found the answer myself, since they are tables, you can put after the number the next thing that comes, like a string

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