check2 = true
while check2 == true do if p.Humanoid.Health ~= 0 then rotate() follow() elseif p.Humanoid.Health == 0 then check2 = false end end
is what I tried to use, but it freezes roblox studio,
If I added a wait() the function will take a while to run, hence the result is not instant.
Any suggestions as to what kinds of loop i should use?

5 comments
oh so I'm trying to make it so that when the player moves his / her character, the npc will face the player and the player's character will face the npc constantly. However if I use wait(), there will be some flickering response, not smooth. So i wanted to remove wait() but the game freezes. Any idea what I should do?
yes there's another way to do it actually
how?
i've editted the answer go and check it out
Thanks!!