Does anyone know a script on how to make an open button to open a frame, but the open button is only enabled for group members?
game.Players.PlayerAdded:Connect(function(player)
local GUI = {gui location}
local groupid= {groupid}
if player:IsInGroup(groupid) then
gui.enabled = true
Make sure the GUI is disabled by default.
1 Like
Do you know how to make the gui visible for group ranks and up, instead of all ranks?
Just change the
if player:IsInGroup(groupid)
to
if player:GetRankInGroup(groupid) >= (rank id you want to have access and above) then
gui.enabled = true
However, that would still not work, because it does not change what the gui looks like for every individual player.
The correct method to find the player’s gui is to replace the line
gui.enabled = true
to
player.PlayerGui.(guilocation).Visible = true