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

How do I make this admin panel rank only script?

So, I'm trying to make an admin panel for ranks 6+ in group League Hotel (Group ID is 4646564) and it doesn't work. Here's what I have so far. Any help is appreciated. Also, it's a local script.

local plr = game.Players.LocalPlayer 
if plr:GetRankInGroup(4646564) >=6 then
    if game.StarterGui:FindFirstChild("AdminPanel") then
        game.StarterGui.AdminPanel:Destroy()
end

1 answer

✓ Accepted answer

StarterGui is for placing UIs in everyone's PlayerGui, you should not be deleting it from the StarterGui.

What you can do is define the PlayerGui and delete it from there.

local plr = game:GetService('Players').LocalPlayer
if plr:GetRankInGroup(4646564) <= 6 then -- LESS than rank six
	plr.PlayerGui:WaitForChild('AdminPanel'):Destroy() -- Destroy from their PlayerGui
end

A tip: When making an admin panel, make sure to try and do everything server side so you can check their rank/requirements there to prevent exploiters trying to use the system.

1 comment

0

Thank you.

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