How to weld a part to a HumanoidRootPart on Equipped() event?

Im trying to make a tool in which when you equip it,
The weld’s Part1 get’s set to the character’s HumanoidRootPart.
So the HumanoidRootPartWeld can get welded with the character’s HumanoidRootPart.

This is how the script looks so far:

But also, when the tool get’s unequipped i want it to get unwelded.

There are more details:
image

Also i should mention that the tool does Not require a handle.
Any help will be appriciated, Thanks!

You need to define Part0 as well.

I did, Part0 is set to HumanoidRootPartWeld

Wait, so does the welding work?

To unweld it when it’s unequipped, do:

script.Parent.Unequipped:Connect(function()
	script.Parent.HumanoidRootPartWeld.Weld.Part1 = nil
end)

That’s one part of the concern, But now the second one. When I want to get welded.
An error pops up that there’s no such thing as “HumanoidRootPart” In workspace.Tyranozauru. Any idea how to fix that?

Because you misspelled “HumanoidRootPart”. The script says “HumanoitRootPart”

1 Like

Ooohh… I didn’t notice that, Thanks lol