Trouble with making a gunship NPC rotate

  1. What do you want to achieve? Keep it simple and clear!
    I want to make this gunship npc rotate when it’s moving left or right.
  2. What is the issue? Include screenshots / videos if possible!
    I can’t figure out how to do it.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes I did, in fact I tried to use BodyGyro.

I would appreciate any kind of help!

This model is similar to Zombie Onslaught Game’s enemy. Which is owned by SuperEvilAzmil, (i don’t remember his name but im fan of him). That’s my old game… (Back to 2016, I like this game.)

Indeed, I am recreating the gunship from there.

If this is an NPC and not an Animated Object, try using Humanoid:MoveTo. Roblox has made these easily accessible because there is an extensive amount of math involved. You also have to make sure it’s not anchored. Roblox API Humanoid:MoveTo: Humanoid | Documentation - Roblox Creator Hub

Oh, I think you missunderstood what I was saying, I am currently using BodyAngularVelocity + VectorToWorldSpace to make the gunship rotate when it goes right or left.

I’m not really sure what you are trying to make. Are you trying to make so that the gunship rotates based on the player’s mouse? If so then just make a body gyro and set the cframe of the body gyro to the mouse’s look vector.

No, what I am trying is to make the gunship rotare depending on it’s position.
For example, if it’s going right, then it rotates to it’s right.

I’m quite confused. As your title states, this is an NPC, so it would probably be best to use something already available for you. If you insist on using physics, that is going to include a lot of math. I’m sure a few people have made modules for things like this so I guess you could research “Rotation modules” or “NPC Rotation Script.”

1 Like

I will indeed try that, thanks!