Smooth NPC Rotating

I’d like to make a way for my game’s NPCs to rotate and “look” at players while moving, without locking them in place.

I tried achieving this with BodyGyros, which worked for most situations but ultimately fell short due to conflicts with other BodyMovers and movements.

The rotation I am going for would ideally be similar to how a Player would rotate when moving their mouse in First Person/Shift Lock, simply rotating their body without applying any external forces.

Is there a consistent way to make an NPC face different directions like a Player?

if its not really a important feature of the game you could just make it client sided and use run service to make it look at the player

This is an extremely important feature to have, as some attacks require the body to be aiming at the player (as well as hitbox alignment).

have you attempted trying springs? NOT the roblox ones

I’ve never heard of this being used for rotation, nor do I know what the Non-Roblox springs are.

This seems like it could be an interesting solution, do you have more information on how I could use these?

also i meant not spring constraints springs are more like a module script used for different things and a alternative for tween-service with rotation especially in 2d

if you want i can send you the module

2 Likes

Yeah, that’d be great.

Does this module work well in 3D environments as well?

i think so
but if you want to find different modules you cant really find it on youtube you gotta find in the devfourm
Spring.lua (3.3 KB)

this is the github for it