I am modifying a slingshot script to prevent teamkilling. What I have been trying to do was that when a humanoid touches the projectile, it will not take damage if it has a certain teamcolor.
For reference, the humanoid = hit.Parent:FindFirstChildOfClass("Humanoid") and hit is when the humanoid comes in contact with the projectile.
Here is a snippet of what I have tried:
if humanoid.TeamColor("Deep Orange") then --don't take damage
Instead of Deep Orange, I also tried 1005 as it is the color code. Both have given me the same result with the projectile not causing damage to ALL humanoids, no matter if they are neutral or a different team.
My best guess is that instead of .TeamColor it is something else. I could not find any useful information in the Wiki of how to express TeamColor for a humanoid which is why I am asking here. Can anyone help me out?

2 comments
he's preventing teamkilling not killing other players on other teams
well he obviously needs to show more code then..