"Incomplete statement: expected assignment or function call" error

Hey everyone!

I need a refresher… haven’t done this in a while. I’m trying to get to a text label but the model name is all numbers (which I can work around) and there is a space in between a script name. How can I get around roblox yelling at me?

workspace["185"]["A-Chassis Tune"].Plugins.AC6_Stock_Gauges.Fuel.Text

Any help appreciated. :two_hearts:

Because you aren’t declaring a new value for Text, if you leave something like that without a variable, or without modifying the values, the game will just assume its incomplete.

1 Like

You didn’t add anything for assignment or a function so it’s like that

1 Like

It has nothing to do with the spaces or the numbers. The script editor automatically adjusts to this by putting the square brackets around them (this is technically indexing).
The reason why it is showing this is because you aren’t doing anything with this. The parser will go through every line, and when it reaches this line, it doesn’t know what to do - because you haven’t told it to do anything.
You can fix it by putting an equals sign (=) after in order to change it.

workspace["185"]["A-Chassis Tune"].Plugins.AC6_Stock_Gauges.Fuel.Text = "change this text"

Roblox isn’t yelling at you (lol), its just showing you where your code might not be understood by the parser.

1 Like

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