Two identifier problems

  1. I wanted to make a creature that followed the player when you got too close to it.

This is a screenshot of the code:

  1. Then, it says two errors.
    At line 3, it says “Expected identifier when parsing expression, got ‘local’” and another on line 26, which was “Expected identifier when parsing expression, got ‘)’”

  2. None, all seem to have the same problem but in another way.

1 Like

You cannot do this:

image

You’re writing code within a function’s parameters

So? Thats what im trying to do here. I want the script to recieve a fire and execute that code.

That’s not how that works, you have to listen to the BindableEvent’s Event signal:

BE.Event:Connect(function()
   --... your code in here
end)

Aight, thanks pal. Im not really good at scripting, but the second problem still isnt solved.

For the second problem, this:

image

Should be removed

When removed, it still causes another problem.
“Expected ‘end’ (to close ‘function’ at line 2), got ; did you forget to close ‘do’ at line 16?” is what it says now, in line 25 and 26.

Send a screenshot of what your code looks like now


here.

Add end) after this:

image

Thanks, not really good at scripting after all.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.