This is the code I tried but it didn't work. I put it in a local script and placed it inside starter GUI with the GUI itself as the child.
local requiredRank = 246 local groupId = 5169488 local client = game.Players.LocalPlayer if client:GetRoleInGroup(groupId) >= requiredRank then client.PlayerGui.Rooms.Enabled = true client.PlayerGui.StaffTeleport.Enabled = true end
You need to use the rank as a name, not a permission number
local ID = 5169488 game.Players.PlayerAdded:Connect(function(p) if p:IsInGroup(ID).Rank == "Admin" then --let's say for instance there's a part that cancollide = true Instance.new("Part").CanCollide = true end end)
You have almost done it, the thing is that you need to use :GetRankInGroup() and not :GetRoleInGroup().
GetRank returns the rank id that the player has, this is what you would want to use.
GetRole returns a string name of the players rank/role.