I'm using a tip31 to flash the lights with music, but when I turn a 5V relay to connect the tip31 with ground of the circuit
What package style is it?
where is your supply for the lights and relay coming from? the 7805 right?
What I'm saying is I'm writing different colors using mosfets. They're Q1, Q2, and Q3 near the top of the drawing