Pressed button affecting LEDs but not executing button code

Hi! I am trying to create an Arduino code that replicates a “light chase” game, where an array of LEDs light up one after another. When someone presses a button, the light will “stay still”. When the button is pressed again, the light movement continues. In my project, in both Tinkercad and real life, a press won’t be recognized by the code or the serial monitor; however, the LEDs will dim for some reason. It would be greatly appreciated if someone could help me :smiley: . I’m new to Arduino and everything, so please forgive me if I posted this incorrectly!

Thanks!

Hi. Please post your sketch and schematic. Read the forum guide to find out the correct way to post those things. A hand-drawn schematic will be fine.

however, the LEDs will dim for some reason.

Sounds like you have wired up your button incorrectly. But who knows what you have done wrong until you show us what you have done.