Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I make the npc look at you while moving?

Asked by
synkrio 281 Moderation Voter
4 years ago
Edited 4 years ago

I'm trying to create an ai that tries to backstab you. When the npc thinks that you see it, it tries to trickstab you. It will strafe left and right while looking at you. I want to work like when you turn on shift lock. The problem here is that the npc freezes when it turns. How do i fix this?

            humanoid:MoveTo(playersHumanoidRP.Position)
            local number = math.random(1,4)
            if number ~= 1 then
                character.LowerTorso.CFrame = CFrame.new(character.LowerTorso.Position, player.Character.LowerTorso.Position)
            end

1 answer

Log in to vote
0
Answered by
synkrio 281 Moderation Voter
4 years ago

I figured it out by turning off autoRotate and putting a bodygyro on the humanoidrootpart

0
thank you for posting your solution dualworlds 90 — 4y
Ad

Answer this question