This script is located in ServerScriptService and when it runs in Play mode it keeps telling me that Character is a nil value
game.Players.PlayerRemoving:connect(function(player)
for i, v in pairs(game.Players:GetChildren()) do
if v.TeamColor == BrickColor.new('Bright red') then
v.TeamColor = BrickColor.new("Bright yellow")
end
v.Character.Humanoid:UnequipTools()
if v.Character.Humanoid ~= nil then
v.Character:BreakJoints()
end
end
end
end)

3 comments
Well, the player just left, since it's in a PlayerRemoving event. So why should a player that just left have a character?
@GoldenPhysics, yes, what I was hoping the for i, v in pairs would do is loop through all remaining players and kill them. Though if that doesn't work, would the best idea be to have a LocalScript call a remote event and do the killing in another script?
Put line 7 inside the if statement right after it then. You have to check for the character for that, too.