slipstick:
No picture is attached.If "spinning endlessly" means it rotates through more than 360 degrees then a normal MG996R simply cannot do that. So either you have a continuous rotation version rather than a standard servo or you have a faulty servo.
Generally the same code will drive a standard SG90 and a standard MG996R though it is possible the angles may need to be adjusted slightly. The MG996R also needs a lot more current so swapping them over can cause problems if whatever battery/power supply you're powering the car with is overloaded.
Steve
hi steve.thanks for your insight. i failed to upload the picture due to the size is too large and when i resize it became too blurry. so i decided not to put one. sorry for that. i believe my problem now is becaus epreviously im using a 180 deg servo. now im using 360 servo so the coding will not work and will rotate endlessly. i have no idea how to do the coding for a 360 one. if u can help i be delighted, or else i think i might just bought a new servo. thanks again