Awarding users admin privileges

My apologies if this is in the wrong section. However, I was wondering how I would approach making a system that many cart ride/obby games have where you earn admin after completing it?

I am just hoping someone can lead me in the right direction. Making such tasks.

HD admin has an interface that allows you to rank users. Not exactly sure how to use it, but I found this:

local hdMain = require(game.ReplicatedStorage:WaitForChild("HDAdminSetup")):GetMain()
local hd = hdMain:GetModule("API")

hd:SetRank(Player, "RankNameHere", "Server")

Thank you so much!! Once they have reached the end, do I have them touch that part and then rank them if they have passed all the other check points?

If only your friends will play this game, you can just have one end part that the user will touch to receive admin. If you want other people to play as well, you should go with the more secure way and have the player reach every checkpoint to be able to win.
You can store the number of total checkpoints pressed, and only allow them to win if that number equals how many checkpoints there are. And make sure to only count them touching it if they’re close to it!

local function playerIsNear(player, checkpoint)
    local char = player.Character
    return (char.PrimaryPart.Position - checkpoint.Position).Magnitude <= 7
end

local function charIsNear(char, checkpoint) -- using Character directly
    return (char.PrimaryPart.Position - checkpoint.Position).Magnitude <= 7
end
1 Like

Thank you so much.

bla bla blab lab abla

1 Like