Weird Syntax Error


I am getting the above syntax error, with the explanation being “Incomplete statement: Expected assignment or function call.”


Surely WaitForChild with a valid set of parameters would be a complete function call?

Is this a bug? Am I being hopelessly incompetent?
Please send help :sweat_smile:

1 Like

This is definitely an error. Try copy and pasting the script into a new one to see if it fixes.

1 Like

You might have an invalid letter, I got that before, try deleting these too lines and rewriting them manually, make sure to not accidentally hold ctrl while typing

1 Like

Is your function completed or does your function code literally only have

local function OnReadyToMoveCamera(OtherPart)

1 Like

The syntax error comes on line 2 so ultimately whether or not that function is complete is entirely irrelevant as that part isn’t even being interpreted.

But for peace of mind, the function is complete with no syntax errors.

1 Like

I tried retyping it in different script manually and it still comes up with that same error.
Perhaps my studio client has some sort of issue with it so I reckon I need to reinstall it when is what I’m going to do now.

Reinstalling studio did fix the problem, it can no longer be produced. Thanks for all the guidance everyone (although somewhat misinformed in some cases).

1 Like

If it’s a syntax error, try running your code and see if it runs properly

1 Like

Because it’s a syntax error, the code doesn’t interpret and only runs up until the syntax error. So if I were to write a print underneath that WaitForChild it wouldn’t run at all due to the error.

Could you try copy pasting this replacing yours and see if it works?

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("ReorientateCamera")

local function onReadyToMoveCamera(otherPart)