I am so confused

read until end

So, I made a vending machine.




Script template for a number button on keypad:

But for some reason, when I click on one of the numbers, it doesn’t add that number to the string. I’ve tried


and many other lines of code.

Also, the backspace and Go buttons seem to work.

Please help!

For clarification, please ask.

Any help is appreciated!!!



it looks like you’re not setting the TextLabel’s text, but instead you’re creating a variable and with the label’s text and concatenate it with the number without ever using that variable again, what you want to do is label.Text ..= number in the AddNumber function


Thanks! But now I just realised… the Backspace button isn’t working either.


yeah same thing, you’re not setting the it as the text of the label, you need to make sure to apply the text to the actual text label, once again, do label.Text = text, not local text = label.Text. the latter creates a variable with the label’s text and anything you do to that variable is done to the variable, not the textlabel’s text

Ok. And, I am really sorry, but there’s one more error I need help with.

my new script:

And for some reason, the cloning isn’t working.

you didnt set the clone’s parent

1 Like

I am so stupid sometimes. Like, really stupid.

1 Like

happens to me too, its really annoying


Yes! I finally managed to make it work! Now I have a WORKING vending machine with numbers and all!

Thank you sooooo much for the help.


Sorry to bother but what font are you using in code editor for Roblox Studio?


The default font - the one I’ve been using since I started scripting in roblox and that is set as default when you download studio.


1 Like

The default font is “Courier New” and that isn’t Courier New could you tell me the font name please

Wait what ----- isn’t that it? Hmmm… lemme check…
Btw are you asking cuz you like the look of it?

No sorry, you are right:

But I swear I didn’t change it (at least I don’t remember changing it)

I remember having this same font since when I installed studio.

1 Like

Could you PLEASE tell me why you wanted to know?

Do you like the font or something?

1 Like

Yeah I thought it looked really nice, that’s all thanks for telling me :smile:

No problem. Not gonna lie I like it aswell but also thanks for telling me about the courier new font cuz I like that one aswell.


1 Like