I am making a gun that works right now perfectly fine but i try to make it non friendly fire but i keep getting error "TeamColor is not a vaild member of model"
This is my code
function Damage(Part)
if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.TeamColor ~= Player.TeamColor then
Part.Parent.Humanoid.Health = Part.Parent.Humanoid.Health -Dmg
end
end

1 comment
Thanks it works now :)