Roblox Rthro Zombie not attacking non-moving players

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.

You can get the rthro zombie here :nauseated_face::

2 Likes

Can anyone help me or contact a roblox dev/admin currently on the devforum.

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.

Here’s a YouTube video that I think will help for making the zombie chase players: https://www.youtube.com/watch?v=zmEYJFRTEeg

Then for damaging them, you’ll want to have something like a .Touched event that lowers the player’s health from their humanoid.

Oh but the way mine works is that it sort of “slaps” the player and then damages them. Also it already chases players

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.

Ah yes, I didn’t think about that! Good thinking.

Yeah

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.

Do you want me to share the script?

I’ll take a look at the model right now.

Ok thanks so much! That will help me a lot!

Are you making the modification right now?

I’m still trying to reproduce the error you were describing.

Oh just set your walkspeed and jump power to 0 and stay in 1 spot and wait for the zombie to get to you and start to attack you.

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.

So it slaps me but like cant really get to me and attack me. It can kill me but it takes a long time.

I will show you a video

Actually it dosent slap me

1 Like

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.

1 Like

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.