None of the words are coming up on the buttons!

Only the word for the enter button is working but not for any other one!

Does someone mind helping? I’m new to code and I’m still trying to figure it out

https://cyoa-game-emily-m.emoore0731.repl.co

Here’s the code for one of my buttons:

a1Button.pos = { x: width / 2 - 50, y: height / 2 + 100};
  a1Button.w = 100;
  a1Button.h = 65;
  a1Button.collider = "k";
  a1Button.color = buttonColor;
  a1Button.text = "clear your \nthroat to \nlet him know \nyou are here";

@Welcome to the community, @emoore0731!
Could it be that by setting the color of the text to the background color, you are making them both the same color?

I just tried that but it didn’t work.

There was a big bug I fixed just before this where the words that were supposed to be the button were all over the screen and once I fixed that on the words disappeared

Could you invite me to your repl so I can properly help you?

Just did!

Thank you for helping!!

@emoore0731 I will help again in the morning (it is 9:30PM here)

1 Like

@emoore0731 Odd. I played around with a few things, but to no prevail. Also, don’t move a elelement off screen when you are done with it, rather use the .remove() function.

It’s ok.

And thanks for the info! I’ll try .remove() out!!

Thank you so much for your help!!

@emoore0731 I have already applied .remove() to enterButton. The syntax is as follows:

enterButton.remove();

It’s that smiple. Just replace any lines where you move a element off screen with that.


Sorry that I couldn’t figure it out. Are the button and the text within the button separate elements or are they combined?

I think they are the same. The camp I did told us to put that. I’m still learning so I’m not completely familiar with code yet.