I mean, would it go in workspace? Or a weapon?
function OnTouch(hit)
if hit.Parent ~= nil then
if game.Players:FindFirstChild(hit.Parent.Name) ~= nil then
opponent = game.Players:FindFirstChild(hit.Parent.Name)
if opponent.TeamColor ~= script.Parent.creator.Value.TeamColor then
tagHumanoid(hit.Parent.Humanoid)
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage
wait(2)
untagHumanoid(hit.Parent.Humanoid)
end
end
end
script.Parent.Parent = nil
end
script.Parent.Touched:connect(OnTouch) |