I'm trying to make a sword and the code below is in a regular script, inside the sword.
I want it to be that if you hit an enemy with the sword the enemy is damaged by whatever damage is in the script (obviously) but I don't want the sword to deal damage to you or your teammates.
damage = 5
Saber2 = script.Parent.Saber2
function DealDamage()
end
Saber2.Touched:connect(DealDamage)
I'm not sure what I should put in the DealDamage function, or if that's the best way to go around doing this.
Could someone tell me what I need to put in the function or if there is a better way to be doing this?
Thanks.

2 comments
This code is barely readable...
Again on my phone can't do much about it And can you guys really stop rep-Ing me down cause it ry to help on my phone