I am trying to make a GUI only a certain rank of my group can see. I have a LocalScript, but Roblox isn't recognizing Humanoid:IsInGroup(groupId)
local Humanoid = script.Parent:WaitForChild("Humanoid")
local groupId = 4274644
local requiredRank = 250
if Humanoid:IsInGroup(groupId) and Humanoid:GetRoleInGroup(groupId) >= requiredRank then
game.StarterGui.StaffTeleport.Enabled=true
-- do something.
end
When I press test or even play, the GUI is seen in PlayerGui, but it doesn't disappear for people not in my group.
I put the LocalScript in the StarterCharacterScripts. I'm not sure if that's the right spot to put it though.

1 comment
This removed the errors but the gui doesn't show up :/