I'm trying to make a damage script for A-Chassis, basically a bumper will fall off if the car crashes at a certain speed, for this instance 100>. Problem is, the "then" part of line 8 gets the error "expected identifier when parsing expression, got "then". I don't know how to fix this.
Here's the code:
local vm = script.Parent.Parent.Parent.DriveSeat.Velocity.Magnitude enabled = true function onHit(hit) wait(10) if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then if vm == 100> then print("func") end end end script.Parent.Touched:connect(onHit)
Any help is greatly appreciated!