Incomplete statement: expected assignment or a function call

I’ve tested my game on Roblox Studio, and it works completely fine, but after I published it, I started getting errors in the real game that don’t exist while testing in Roblox Studio.

The error:

Incomplete statement: expected assignment or a function call

The script:

local mannequin = script.Parent.Parent.ScrollingFrame.LocalScript.Mannequin.Value

script.Parent.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.Events.TryOnEvent:FireServer(mannequin)
end)

There doesn’t seem to be any problems with this script. Judging by the error you got in the console, the error was on line 2 of a script, but this one has nothing on line 2.

1 Like

I was going to say the same thing too :smiley:

So it’s just an error on Roblox’s side?

No, this is simply the wrong script to be showing us.

1 Like

You absolutely can assign properties to variables. In addition, the error is a syntax error unrelated to whether the variables work or not, and it’s also unrelated to this script unless I’m missing something.

Can you show us the TryOnScript?

Sorry, I’ve had problems with it in the past.

The way it related to the script in this context was “local mannequin” was equal to the value of what I’m assuming is some kind of StringValue. I proposed “local mannequin” should equal the StringValue itself and pass mannequin.Value through the event instead.

The script is the one I put in the post

Could you send a picture of the explorer tab?

By the output it looks like the script in your game is different from the one in studio, make sure that you have published the latest version in studio to roblox.

I’ve just encountered this same error on a print statement…

print("Making interactable: " .. part:GetFullName())

part exists at the time of reference, since it can output the full path of the part.

I have only been able to get this to popup once, but I have been getting other frequent odd behavior with Instance.new("ProximityPrompt") creating duplicate instances.

Related post

Did you ever arrive at a solution for this?