But the servos were under powered so I replaced it with 2xMG996R servos. using the same mobile phone charger, one servo behaved erratically and the other did not respond.
I upped the power source for the servos using a 5V5A ACDC adapter and neither would work
Does the code need to be looked at or is it the power supply? I'm really confused.
Please post schematics and a link to the motors. Explain what the mapping of 0 to 1023 into -1 to 2 is intended to do. map returns an integer as far as I know...
Please follow the advice given in the link below when posting code. Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination
5V 5A should be adequate for 2 x MG996s provided it is a good regulated power supply and the supply negative is connected to the servos AND the Arduino GND which your sketch does not show.