I hope anyone can understand what I mean
No, because you posted no code and said nothing about how the switch is wired.