How do I make this script about impact speed work? Basically I want a MeshPart to go transparent after it is hit at 90 speed and above. But, this is not working. Can anyone tell me what to do? I'm a rookie scripter and get most of my stuff off the internet.
script.parent.Touched:Connect(function(hit)
speed = math.sqrt(hit.Velocity.X^2 + hit.Velocity.Y^2 + hit.Velocity.Z^2)
print(speed)
end)
if speed >= 90 then
end
script.parent.Transparency = 1
Script is in a MeshPart on a car. Should the car be anchored?

3 comments
Check your output please. It's .Parent. Lua is Case Sensitive.
I made a solution!
@RubenKan Thank you so much.