I've tried many times to make a team change GUI but I've failed each time. I'M GOING TO CRY.
COMMUNITY QUESTION
Is it possible for me to get a team-change GUI off the toolbox?
1 answer
Just make a button for how ever many teams you have and parent them to a screengui or frame within a screengui. Parent the localscript to the screengui/frame and place the following code:
local ply = game.Players.LocalPlayer
buttons = { }
teams = { }
for i, v in pairs(script.Parent:GetChildren()) do
if v:IsA("TextButton") then
table.insert(buttons,v)
end
end
for i,v in pairs(game.Teams:GetChildren()) do
table.insert(teams,v)
buttons[i].Text = v.Name
end
while true do
for i,v in pairs(buttons) do
v.MouseButton1Click:connect(function()
ply.Team = teams[i]
end)
end
wait(0.2)
end
Probably better ways to do this, but this is how I'd do it.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Probably.