local team = game.Teams.Lobby
local function ontouch(part)
local hum = part.Parent:FindFirstChild("Humanoid")
local players = game.Players:GetChildren()
if players then
if hum then
players.Teams = game.Teams.Lobby
hum.Health = 0
end
end
end
script.Parent.Touched:connect(ontouch)
IDK whats the problem here.

2 comments
You could just use player.Team = team
so like player.team = team?