Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Team only GUI

Asked by 10 years ago

I know there is a way to make a Team-only GUI because most clans have it that way. Anyways, how do you make a GUI for one team ONLY?

2 answers

Log in to vote
1
Answered by
Aethex 256 Moderation Voter
10 years ago

The easiest way, to my belief, to do this would be to use the PlayerAdded event and check the player's team before they join. You could store the GUI in ReplicatedStorage and put a script in the Workspace to check if the player belongs to a certain team.

game.Players.PlayerAdded:connect(function(plr)

    if plr.TeamColor == BrickColor.new("Bright red") then

        local gui = game.ReplicatedStorage.GUIName

        gui.Parent = plr.PlayerGui;

    end

end
Ad
Log in to vote
0
Answered by 10 years ago

if you wish to know how to make it only for a group here ya go

game.Players.PlayerAdded:connect(function(p)
local GroupId = 372 -- Scripting Helpers Group Id

    if (player:IsInGroup(GroupId)) then
        local Group_Gui = game.ReplicatedStorage[GuiName]:Clone()
        Group_Gui.Parent = p.PlayerGui
    end
end)

Answer this question