Unexpected Unicode Error


Hi there! I made a script that changes a value:


The only problem is whenever I try it, I get this error:

Unexpected Unicode character: U+202c.

The values I want to change are IntValues, I tried to do it with NumberValues too, but I get the same problem.

The error is first of all on the first line, but when I remove that line the error gets on the second line, if I remove the second line the error is one the third line, etc.


Thanks for reading and I hope someone can help me out :slightly_smiling_face:

2 Likes

Try rewriting the lines of code, and see if it happens again.

Also, you shouldn’t be doing WaitForChild() multiple times to retrieve the same object, since you’ve already waited.

Hope this helped! If I made any mistakes, please tell me.

1 Like

Any chance you are using an international keyboard that might use different character?

I feel like your keyboard types a different “o” character.

Rewriting this in a cleaner way, this code (purely written with US keyboard) works.

local player_gui = player:WaitForChild("PlayerGui")
local lettuce_values = player_gui:WaitForChild("LettuceValues")
lettuce_values.MineLettuceBronze.Value = 20000000
lettuce_values.MineLettuceSilver.Value = 50000000
lettuce_values.MineLettuceGold.Value = 100000000
lettuce_values.MineLettuceDiamond.Value = 200000000
2 Likes

Yeah, I’m using another keyboard, I will try it.


i found this character as the U+202c character, maybe this is going to help?
also, don’t do multiple waitforchild.

1 Like

You should post code in text instead of images, so that we can identify all the characters used.

Thanks, it worked! And thanks for improving the code too!