I'm making my own kind of "bots" you could call them...
I'm making an offensive mode where the bot would shoot you, other players or other bots, whichever is an enemy and the closest to him. In this offensive mode, I want the bot to constantly look at its opponent, regardless of how it's moving(kind of like when you're walking sideways in first person and keep your camera on a specific point). I already figured out I should disable "AutoRotate" in the humanoid, but from this point on I'm struggeling.
I could use a loop and CFrame to keep the bots eyes on his enemy, but that's very messy and ruins the walking part. I thought BodyGyro might do the job, but I'm very unfamiliar with it and when I tried it, it glitched out a bit...
So my question is, is there an easy and efficient way to make my bot constantly look at it's target? (note that the target is most likely moving as well) |