function HIT_HANDLE(hit, dmg, tags)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid:TakeDamage(75)
PlaySound("Hit")
PlaySound("Dead")
end
end
So basically this is the original part of the script where if the tool (the throwing knife is the tool) hits a player, it deals 75 damage, what I have been trying to do is set up the script so that if the player the throwing knife hits is a teammate, it wont do damage, and only would if it wasn't a teammate, this was my best attempt at it and still was having troubles... :/ :
function HIT_HANDLE(hit, dmg, tags)
if hit.Parent:FindFirstChild("Humanoid") then
if hit.Parent.TeamColor ~= Player.TeamColor then
hit.Parent.Humanoid:TakeDamage(75)
PlaySound("Hit")
end
end
end
Thanks in advance to anyone who helps me figure this out!

1 comment
Characters do not have a TeamColor. View the output.