I am currently trying to make a GUI which has two buttons, each of which team you to the corresponding team. I've got the teaming down and it works completely fine with FilteringEnabled however, I would like to make it so that it respawns the player who presses the button and adds -1 to their wipeouts.

This is the script responsible for the teaming:

local rstorage = game:GetService("ReplicatedStorage")
local brightblue = rstorage.Brightblue
local brightred = rstorage.Brightred

local playeradded = rstorage.PlayerAdded

game.Players.PlayerAdded:connect(function(player)
	wait()
	playeradded:FireClient(player)
end)

brightblue.OnServerEvent:connect(function(splayer)
	splayer.TeamColor = BrickColor.new("Bright blue")
end)

brightred.OnServerEvent:connect(function(splayer)
	splayer.TeamColor = BrickColor.new("Bright red")
end)

1 comment

0

Not a request site! Come back when you have attempted this.