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

How to give teams different menu’s/GUI’s ?

Asked by 4 years ago

I want to make a game where if your on the red team you get your own menu, and if you're on the green team you get your own menu. I have searched everywhere to find this but either I am not wording it right or there is nothing out their on this. So basically teams get different menu’s and/or gui’s.

0
if player.TeamColor == Brickcolor.new("Bright green") then rexhawk 222 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Hey there, Historial. The best way to do this is by putting a folder inside your ReplicatedStorage, and maybe naming it: "UI_Folder". Put all the different UIs in there and inside of a local script do something like this:

repeat wait() until game.Players.LocalPlayer.Character
local folder = game.ReplicatedStorage:WaitForChild('UI_Folder')
local player = game.Players.LocalPlayer
local char = player.Character

if player.Team == game.Teams['Team1Name'] then
    local new = folder:WaitForChild('Team1UIName'):Clone()
    new.Parent = player.PlayerGui
elseif player.Team == game.Teams['Team2Name'] then
    local new = folder:WaitForChild('Team2UIName'):Clone()
    new.Parent = player.PlayerGui
end;

This script is very quick and easy but it's pretty simple. Use this as a template to solve your problem. Hope this helps!

0
I see how this script would work, but when I put my UIs inside a folder which is in ReplicatedStorage, and the script in ReplicatedStorage. It doesn't do anything, Historical_pilot 2 — 4y
0
would you need to put the team names and stuff in quotation marks because it's a name Historical_pilot 2 — 4y
Ad

Answer this question