Hi guys! I have a problem. I made three teams, and added colors to it, and made for every team a spawn, with the same color, which I gave to the teams. And I made a team changer gui too. And everything works fine, because when the player joins to the game, they automatically joins to the “Menu” team. The game waits for the players action. After the player selected the team, the spawn is brokes for the selected team. How can I fix this?
So there’s my teams:
And there’s my GUI:
Here’s the code from the TeamGui → Background → PlayAsARed → PlayButtonScript:
local p = script.Parent.Parent.Parent.Parent.Parent.Name script.Parent.MouseButton1Click:Connect(function() game.Players[p].TeamColor = BrickColor.new("Really red") script.Parent.Parent.Parent.Enabled = false game.Workspace[p].Humanoid.Health = 0 wait(5) end)
If anyone can help, to make this teleporting possible through this code, please write down to the comments your solutions! Thanks for everyvone! Have a nice day!