Hitbox not detecting moving NPC

G’day, fellow scripter! I am having an issue with my ai NPC not being detected on a basic touched event after running on a pathfinding module.

How the system works is very basic, Npc runs to the character after the character attacks NPC once to deactivate NPC stun. Once the NPC stun is deactivated, the NPC begins to run to attack my character (I temporarily disabled NPC attacking to better view client attacks). After I attack the NPC the first time and the pathfinding runs, the rest of my touched events/ attacks don’t detect the NPC. I’ve been looking for a fix to this for a while so anything helps!

NPC First time hit: https://i.gyazo.com/e02ec5c80b4cae97c606ca6c475f43e7.gif
NPC After Pathfinding ran hit: https://i.gyazo.com/4e6db7f4391f7f497386e2465ddd67f6.gif


1 Like

Maybe a debounce isn’t getting reset after the NPC is hit or the .Touched event is being disconnected? I’m not exactly sure.

1 Like

all of the script options have been looked over multiple times and its too much to put in a reply but it seems to be a roblox problem because when printing out the hit object, the attacking character appears to be detected but not the npc. It doesnt seem to be a debounce/ disconnect issue bc the script is printing out the hit objects outside the debounce

1 Like