spin only on one axis

I made a turret that made from many parts. each part need to turn around only on one axis. I know how to make it aim one me but I don’t know how to make it spin only around one axis (spin only around the Y axis or the x).

Sorry for poor english.

What’s a turret? I thought it was part of a castle :confused:

If there are many parts, break it into different objects, then assign a script for each one (if the objects need to rotate in different axes):

function Update () {

Change the 0s to the amount u want.