2 days ago, i had a can of blue colored hairspray. I sprayed it on (my school colors are blue) and I covered my whole head.
A few hours later when i checked my hair in a mirror, it was back to being brown.
My hair is normally pretty dry and thick. Does that effect the hairspray?

Colored hair spray isn’t suppose to last long. It lasts actually about one day (or until you wash your hair.)
Color hairspray is basically watery, colored powder. It comes out very easily since the powder just dusts or flakes off.
If you wanted to actually dye your hair blue, it would last a lot longer.
But basically all you are doing right now is putting makeup on your hair.
you should try not to touch ur hair because the more you touch it, the more it rubs off and wash your hair BEFORE spraying it. thick hair usually is better to keep the spray, you could try putting something in your hair first, like moose or moisturizer and it should hold longer.