If i move to spain for 6 months do I have to change my French licence for a Spanish one?
No not if it is just for 6 months. If you end up here for longer then yes. I have been here now for more than a year and still have my Austrian licence which I will be changing this month.
You may wish to view the page on exchanging a licence here: https://www.angloinfo.com/costa-del-sol/how-to/page/costa-del-sol-transport-driving-licences-eu-driving-licence