Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Button still won't show despite me being the owner?

I'm trying to allow only myself to view the Gui button, not everyone else.

local Players = game:GetService("Players")
local button = game.StarterGui.SuggestionGUI.SuggestionButton
local groupID = 6998516

Players.PlayerAdded:Connect(function(player)
    button.Visible = false
    if player:GetRankInGroup(groupID)== 255 then
            button.Visible = true
    end
end)

1 answer

I recommend PlayerGui so it only enables for the you, and not the whole server.

local Players = game:GetService("Players")
local groupID = 6998516

Players.PlayerAdded:Connect(
    function(Player)
        Player.PlayerGui.SuggestionGUI.SuggestionButton.Visible = false
        if Player:GetRankInGroup(groupID) == 255 then
            Player.PlayerGui.SuggestionGUI.SuggestionButton.Visible = true
        end
    end
)

This discussion is preserved as it was. New answers, comments, and votes are closed.