Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Team only GUI

Asked by 6 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 255 Moderation Voter
6 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 6 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