The vehicle has been damaged by attaching an int value to the vehicle. It works fine in the event of a collision, but it doesn’t get damaged in the event of a gun attack. I want to reduce the int value when attacking with a gun.
local carHealth = script.Parent.Health
if otherPart.Parent = car then
carHealth.Value = carHealth.Value - (30)
Perhaps make a script in the guns side.
'If the guns bullet hit something, search for the carHealth.
If carHealth exist, reduce the value to the desired amount.'