I'm trying to make a vehicle damage system, but when the vehicle scrapes wall it deals constant damage, how can I stop this?
local impactVelocity = parent.Velocity.Magnitude local hitVelocity = hit.Velocity.Magnitude
if impactVelocity >= 40 or hitVelocity >= 40 then
if impactVelocity >= 40 then hp = hp - impactVelocity + 35 else hp = hp - hitVelocity + 10 end
end