How to give a model health?

Basically I have a model that I made for my game. The players will have guns and I want to know how to give this model health like a normal npc that will respawn after death.

I’m new to scripting, I’ve tried all the toolbox custom killer models but they all use humanoids and other scripts that I have no idea how to use and configure.

I’d also like for the ‘monster’ to scream when shot. How can I do all of this?

1 Like

If the model is not a humanoid you will have to create your own health system.
Detect when the gun shoots the model and take health away. when it get to a certain health level “respawn” it

1 Like

For making NPCs, you can still use Humanoid similar when your avatar already has a humanoid.

All avatars or characters spawn with a Humanoid which handles a lot such as your movement and health.

You can use the Events that fires which then you can connect functions to it. Humanoid events such as HealthChanged to handle monster taking damage, Died to handle the monster’s death, and etc. The most tricky part though is the monster’s pathfinding which you should research about

Thanks but I have 0 knowledge on scripting as mentioned. I will continue searching.

This is not a humanoid model. It’s a floating sphere. it has pathfinding however.

My first idea is just to hide the killer parts, then just put the circle model inside of it.

Obviously that’s not gonna work without explanation, so turn CanCollide to false, and Massless to true on all the monsters parts, then, align the model onto the killer NPC, and weld up everything. This is probably confusing, so here’s an example place with some in-depth instructions:

ExamplePlace.rbxl (68.3 KB)

Hopefully the place teaches you some things, and help you make your own stuff. It has some basic Lua for the scream script that you can easily understand. I may have not included everything you wanted since it’s uh… little late.
image

Also, look on google to see if there’s a solution already. I have found duplicate posts after replying.

2 Likes

In that case, add a Value named “Health”(for example).
If the sphere is damaged, reduce the Health value.
Then, if the Health Value of the sphere is below or equal to 0, destroy it and respawn a new one.

1 Like

Do I delete the legs and arms? How do I give this health and make it respawn when shot and killed? And what/who is moon animator for the script? Cant find it. Also did you remove the scripts I already had in it? If you did how am i suppose to make it chase and kill?

Everything i working fine with the normal attack/chase script I have in them. I just want to give it health mainly.

Sorry for the late response. What gun kit are you using? I can see the problem. If it’s the FE gun kit I can help you out, and modify the SimulateBulletScript for you to work with my solution. But if it’s ACS, (By the looks, I’m guessing so) I don’t have any experience with it.

If you try killing it with a classic sword, the killer should die.

As long as it’s inside of a Model, you can just rename the core part (or the hitbox) to “Head”, then add a Humanoid inside the Model. It should work as normal, although it won’t despawn on death. You’ll have to code that in yourself, I believe.

1 Like

You may need other necessary limbs for :MoveTo() though. But I might be wrong.

All it needs is a part named “HumanoidRootPart” in the model, which can be welded to the head.

1 Like