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)
insert screen gui in starterGui and call it TeamGUI then add a frame and two text or image buttons in that frame then put a script in both of those buttons script: ``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.Parent.Background.Visible = false end)`~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~ `