Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Expected identifier when parsing expression, got "then". How to fix?

Asked by 3 years ago

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!

1
"vm == 100> then"........ what are you trying to do, remove that ">" or put ">=" as a replacement for "==" greatneil80 2647 — 3y
0
trying to make 100> be 100 and above nesnotnAGamesHD 2 — 3y
0
Change "if vm == 100> then" to "if vm >= 100 then" appxritixn 2235 — 3y

Answer this question