I want the NPC to stay still until it dies, how can I fix this?

You can write your topic however you want, but you need to answer these questions:

  1. I want the NPC to stay still until it dies

2., It blasts apart the second I touch it or go near it.

  1. I’ve tried anchoring it, but I don’t want it to stay still when it dies. I want it to fall apart.

Images:
In studio.


The problem.

1 Like

Hi there, not 100% sure what you’re looking for, but I’ll post what I think you’re looking to accomplish down below.

My thoughts

Make sure your model has a part named “Head” as well as a part named “HumanoidRootPart”.

Either manually weld the parts together using WeldConstraints, or use Quenty’s Perfection Weld.
Perfection Weld

As @6Clu brought up, if your model has any form of animation it WILL need to be rigged.
Here’s a super useful plug-in to accomplish that with ease.
Rig Editor Plugin

If this doesn’t solve your issue, try adding some more details and I’ll assist!
Good luck!

Have you created the custom rig / welds for it?

When creating an NPC which doesn’t conform to the standard R15 character models you’ll need to create your own motors etc for movement else the entire thing will fall apart.

Here is a video on how to do rigging for example which uses a plugin to represent and show how stuff works, this might be helpful for you as creating your own rigs can be long and hard sometimes:

This was the solution! Thank you very much! :slight_smile:

But it won’t respawn, that is another problem…

Haven’t tested this, just wrote it here. Maybe this’ll help.

The Respawn Script
local Rig = script.Parent:Clone()
local Humanoid = script.Parent:WaitForChild("Humanoid")

Humanoid.Died:Connect(function()
Rig.Parent = game:GetService("Workspace")
Rig:MakeJoints()
game:GetService("Debris"):AddItem(script.Parent, 0.1)
end)

Sorry, I forgot to add a respawn script… my bad.

But, there is an odd thing, I want the NPC’s body to disappear, but it won’t work.

If you want to delete an NPC, just connect to the death a model deletion.

local Model = script.Parent
local Humanoid = Model:WaitForChild("Humanoid")

Humanoid.Died:Connect(function()
    Model:Destroy()
end)

This will remove both the script and the model to be aware.

Have you used the code I’ve provided in my respawn script?
I was pretty sure this line would do the trick

game:GetService("Debris"):AddItem(script.Parent, 0.1)

You can even just try,

script.Parent:Destroy()

to replace that line of code.

To add on, I added an R6 Ragdoll Script.

Where do I put this in the script?

@6Clu wrote a perfectly working despawn script up above.

local Model = script.Parent
local Humanoid = Model:WaitForChild(“Humanoid”)

Humanoid.Died:Connect(function()
Model:Destroy()
end)

This can be an independent script if you’d like placed directly inside of the model.

It works, but the character doesn’t respawn.

Never mind, it works now, I made a mistake.