I am trying to make a team change GUI but is not working. Whenever I try to change my team it does not work it does not even output anything. could anyone help?
Local Script:
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.ChangeTeamEvent:FireServer(script.Parent.Name)
end)
Server Script:
local Teams = game:GetService("Teams")
game.ReplicatedStorage.ChangeTeamEvent.OnServerEvent:Connect(function(Player, Team)
local PhysicalTeam = game.Teams:FindFirstChild(Team).TeamColor
Player.TeamColor = PhysicalTeam
end)

2 comments
local p = script.Parent.Parent.Parent.Parent.Parent.Name script.Parent.MouseButton1Click:Connect(function() game.Players[p].TeamColor = BrickColor.new("Really blue") game.Workspace[p].Humanoid.Health = 0 script.Parent.Parent.Parent.Enabled = false end) script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Parent.Background.Visible = true wait(5) script.Parent.Parent.Paren
how do i make the script appear like you did