I am working on a game that has a gui to select a team at the start of a game as well as a frame under the same parent in that gui. The team change buttons trigger the player to switch teams as well as make the teamchange frame not visible and classSelect frame visible. I also have a text box in my teamchange frame that displays how many players are on a team, but this shows up as the text that I have that isn't affected by code (so just "…"). All of the scripts are inside all the buttons and labels and the frames are inside a gui inside of startergui.
If it helps, here is the code inside of the teamchange button
local plr = script.Parent.Parent.Parent.Parent.Parent.Name
script.Parent.MouseButton1Click:connect(function()
game.Players[plr].TeamColor = BrickColor.new("Really red")
game.Workspace[plr].Humanoid.Health = "0"
wait(5)
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.ClassFrame.Visible = true
script.Parent.Parent.Parent.ZoneWarning.Visible = true
end)

1 comment
What is line 1?