What's wrong with my tire destruction script? I'm making a script where if a certain part (TireBreaker) hits a tire (BRTire) at a magnitude of 10, then those 5 activities under line 4 will occur. I've tested it and it does not seem to work. What am I missing?
function OnTouched(Part)
if Part.Name == 'TireBreaker' then
local mag = Part.Velocity.Magnitude
if mag > 10 then
script.Parent.TireDirt.Transparency = 0
script.Parent.BR1.Enabled = true
script.Parent.BR2.Enabled = true
script.Parent.BR3.Enabled = true
script.Parent.Parent.BRB.CanCollide = true
end
end
end

5 comments
Did you Connect your function to a Touched event?
Add prints, and make sure the script is not Disabled.
I added prints and I am getting nothing. The script is not disabled.
Did you eve listen what did incapaz said? Did you connected function to a Touched event? EXAMPLE: script.Parent.Touched:Connect(onTouched) at the end of script.
Oh I totally forgot about that. I did this: [ script.Parent.Touched:Connect(function(otherPart) end) ] and it still does not work. What am I doing wrong?