Problem with transform.LookAt

I’m following the Tornado Twins tutorial on the worm game.

I have made a turret, consisting of the base(cylinder) och top part(sphere and barrel).

I have attached a script to the top part. The script is shown below.
When I start the game, the top part falls of the base. Otherwise it works as it should, top part is pointing at the worm.

If I leave out the LookAt function(obviously it will not follow the worm), the top part stays on the base, so this function is causing the top part to fall of.

Can someone please tell me what the problem is?

I have done exactly as the tutorial, but their top part stays on the base.
I noticed there were other people having this problem but nobody cared to reply, so I’m hoping of getting better luck here on the Forum.

var lookAtTarget:Transform;

function Update ()
{
transform.LookAt(lookAtTarget);
}

The last Tornado Twins I heard of were a wrestling tag team, but…

The top (turret) part has a rigidbody component? I assume that’s why it falls. Adding a rigidbody tells Unity that you want automatic falling, bouncing, pushing…what game people call “physics.” If you, for real, spin something around, it might roll off whatever it was resting on. Unity is just simulating that.

If the turret just spins, you don’t need it to be a rigidbody – you can just remove that componenent. A non-rigidbody never moves automatically. It will gladly even hang in space. Or, you can “turn off” the rigidbody by checking isKinematic. If the turret explodes, you could turn isKinematic off again, to let the turret drop and roll around.

Thanks for your reply Owen.

These guys are twins with fluffy hair. It could be that they are fans of the Tornado Twins from wrestling :). Anyway, they have some tutorials on youtube.
I have a link to the video if you have time to check it out.
#9 Making a MultiPlayer Game [Unity 3d tutorial] [Adding Bots] - YouTube.
The link to their turret doesn’t work so I made one myself.

I have not attached a rigidbody component to the turret, I’m sure of that.