Can anyone tell me why this RemoteEvent script respawn's the player but doesn't team them? I know I could use game.Players.LocalPlayer.TeamColor = game.Teams.TestTeam.TeamColor or whatever but that doesn't work with FilteringEnabled. Any help appreciated.
Script for when it's fired(In a ServerScript in ServerScriptService):
local Event = game.ReplicatedStorage.ChangeTeam
Event.OnServerEvent:connect(function(Player,Team)
Player.TeamColor = Team.TeamColor
-- wait(0.30)
Player:LoadCharacter()
end)
Script to fire it(In a LocalScript):
local Event = game.ReplicatedStorage.ChangeTeam
script.Parent.MouseButton1Click:connect(function()
Event:FireServer(game.Players.LocalPlayer,game.Teams.TestTeam)
end)

1 comment
Take out the first argument in the Localscript. When you are firing a server, it is already passing the player as an argument. See if that works