I'm working on cars with denting. Basically before all the parts with "script.BD2.Transparency" was replaced with "script.Parent:Destroy()". So, what this means was, sometimes the part would get destroyed before the script finished, so sometimes the next dent mesh wasn't made uninvisible. So I decided to switch them, so the mesh would appear first then the old mesh would get deleted after, but it's not working. Please help.
local DentSpeed = 90
script.Parent.Touched:Connect(function(part)
local Speed = script.Parent.Velocity.Magnitude
if Speed >= DentSpeed then
script.BD2.Transparency = 1
if script.BD2.Transparency == 1
then script.Parent:Destroy()
end
else
wait()
end
end)

1 comment
Read my bio.