I am trying to make a GUI that is only available for people who are in a certain group, And are above the rank of 200 in that group. Anyone below the rank 200 doesn't get the GUI. I can't seem to get the below script working, Any help would be appreciated and if there is an easier way could you please show me.
local config = script.Parent.Configuration
script.Parent.Touched:connect(function(part)
if part.Parent and game:GetService('Players'):GetPlayerFromCharacter(part.Parent) then
local player = game:GetService('Players'):GetPlayerFromCharacter(part.Parent)
if player:GetRankInGroup(config.GroupId.Value) >= config.RankId.Value then
game.StarterGui.MusicP.Enabled = true
end
end
end)

1 comment
None of these seem to work for me.