What can I use to glue LEGO bricks to Metal? So I have no roof lining in my car and instead of replacing it with another carpet I thought covering it in Lego would look pretty cool

What would be the best way to glue the LEGO to the metal of my roof?

I've got a hot glue gun but not to sure it'll work.
This sounds like a job for "Amazing Goop."  It's available at Home Depot and other big stores, at least in the US.  There are a few varieties, including one for automotive use.  It pretty much sticks anything to anything, and once cured, it's on for good.  I've used it for gluing LEGO pieces onto a curved metal surface, and was very happy with the results.  It's a little tricky to work with because it's such sticky stuff, but once you get the hang of it, it's not too bad.  What's great about it is you have a fairly long working time to get the glue on your pieces and get them into place before it dries out. Also it is very strong, and stays flexible, which will be essential to hold up to the vibrations of a car.  One trick will be holding things in place while the glue cures.  Maybe try doing small sections at a time, and using tape to hold the pieces in place.  Also consider gluing pieces onto baseplates, and then gluing the baseplates to your car roof.  It has a strong odor, not terribly unpleasant, but you might not want to drive your car for a few days after gluing.  Good luck!