Hello Developers and Roblox Workers! I need some help with the Rthro Zombie that you have provided. So in my game your player dosent move and it stays in one spot during a match. So when the zombies come to you and start to attack you they attack you once and then they stop. When you move the character from the server the attack 1 or 2 more times. Sometimes they do attack like 4 times but then they stop attacking as if they cant reach the player even though there is no barrier.
The main point is: The zombie is not consistent on attacking players and randomly takes big delays when a player isnt moving.
This is a very big problem That I need help with. Maybe a Roblox Admin/Dev or any Developer can add a feature in the āConfigurationsā folder that will enable the zombie to attack even if the player is not moving. Or just give me a modified version, give me the scripts I need to make it do that, or even just change the entire zombie to do that. Any help received will be greatly appreciated as I have worked hard on this game.
Hmmm, the problem is that I donāt have access to Roblox Studio right now. And Iām more familiar with fixing code problems, not problems with another personās entire work. But Iāll still try to look into it when I can get on Roblox Studio later.
You donāt want to make your own scripted zombie system, or use a different one?
No I would like to use this one as it looks nice and works with the gun(s) i am using
Also can you tell me when you do get access to roblox studio if it will happen in like 10 - 20 minutes. If not then just get the model and try to make it do that.
No, Iām sorry. It would be later today or tomorrow (likely canāt today). However, I can help you with trying to get the model functioning how you want it to as a zombie.
You mentioned that your problem was that since the zombies rely on the .Touched event to do damage, they stop doing damage once they reach the player, since they wonāt ātouchā the player once theyāre already touching them.
Perhaps you should modify the zombies to deal damage based on proximity, i.e. have a loop running that deals damage to the player every few seconds if they are standing close enough.
If you share the script that makes the zombie āattackā the player, we can try to edit it.
Oh I could try to do that I have tried to do make a loop but not if they are within a distance of the player. However I dont really know how to do that in this complicated script. If you have time then can you please get the model and try to make the modification. If not the I will share the script that attacks and damages the player and handles other stuff.
Ok I can get it to happen sometimes. When it does for you does the zombie stand next to you doing nothing or does it slap you repeatedly without doing any damage?
I did some print debugging and it seems the zombie has a target but isnāt saying that iām in range even when next to me.
I think I found a solution. On line 43 of the āNPCā script there is a constant named āATTACK_RANGEā. Try changing that to a higher value like 5 or 6. The problem seemed to stop when I did that.
I think because of the way humanoid:MoveTo works you were able to get far enough away that the zombie canāt attack you, but close enough that the zombie wouldnāt try to move to get closer to you.