I have no idea on how to make a player that changes his teams, doesnt matter how, just when he gets to other team gets killed, or somehow reseted/refreshe, any help for that ?
Hey, you could loop between the teams and connect whenever a player leaves (or joins, your choice) a team and kill them.
for i,v in next, game:GetService('Teams'):GetChildren() do v.PlayerRemoved:Connect(function(plr) plr:LoadCharacter() end) end
I think the best way to do that is to use an event, grab their character and damage the humanoid/kill the player.
Something like this could be a good answer to your problem.
--team refers to the teams within your game Team.PlayerRemoved:Connect(function(player) local character = player.Character if character then character:BreakJoints() end end)
Team.PlayerRemoved:Connect(function(player) local character = player.Character if character then character.Humanoid:TakeDamage(character.Humanoid.MaxHealth) end end)
but both should work just fine
Closed as Not Constructive by hiimgoodpack and cmgtotalyawesome
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?