Im trying to make an “Auto target†system that automatically turns your character toward the nearest enemy. i tried to do this by setting the humanoidrootpart’s cframe to CFrame.lookAt(their current position here, the enemy position here). what i think this is supposed to do is keep them in the same position, but turn their character to look at the nearest enemy. when i tested it, however, the character started glitching a lot. i think this is due to the cframe being slightly off with the position, so i want a way to change the rotation only. does anyone know a way to do this, or possibly another thing to use other than cframe to accomplish the goal?
12 posts - 3 participants