pressedEvent:Connect() Not connecting

BUTTON.pressedEvent:Connect(onClick) is not connecting for some reason. onClick func is not printing. The buttons works, I can hover, press it it changes colors, but its not connecting my func for some reason has anyone run into this issue before? BUTTON has UIButton [73748B0B326B6FBA] reference. It should be working. I have similar setup for anther button and its working. Is there anyway to debug a Connect() func?

Figured it out. It was my mistake. I had a flag that had to go off in order. My script wasn't not in the right order in the UI inventory. The Connect() is working.