I have an admin console that spawns maps and shows available commands. I want it to only show to people with certain ranks (RANKS: 16,17,252,253,255)
Here is my current code that doesn't work.
local rank = 16 local groupID = 4126160
script.Parent.Touched:connect(function(hit) if (hit and hit.Parent and game.Players:FindFirstChild(hit.Parent.Name)) then if (game.Players[hit.Parent.Name]:IsInGroup(groupID) and game.Players[hit.Parent.Name]:GetRankInGroup(groupID) <= rank) then script.Parent.Enabled = true else script.Parent.Enabled = false end end end)
Thanks for your help!

1 comment
Please edit the question and put it under lua.