When making weld from a character to part, character dies?

I am welding a HumanoidRootPart to a part in a cannon, so that when the cannon turns the player turns as well. It initially functions normally, however after the player gets killed being welded to the cannon, whoever then tries to man the cannon (welding themselves to the part) gets themselves killed.

I’ve ironed it down to the weld causing the problem. Whenever the a weld is formed between that part specifically and a character, the character instantly dies. Does anyone know anything regarding welds and character death, or how to solve this problem?

If you need code, let me know.

2 Likes

This is odd. Where are you parenting the weld to? If it’s not parented to the Character who dies, then you should try doing so as it’d erase the weld as well when the Character disappears or dies.

1 Like

I’m parenting the weld to a SitPart, which is inside the cannon
I’ve tried parenting it to the character but no difference

This is happening to me too. It works completely fine the first time and a player can equip a turret without any problems. However if they are killed in some way or another while they are using the turret, he and anybody else who tries to use said turret will die when being welded thus rendering the model as single-use and it’s gamebreaking. Does anyone know what the problem is? Here’s my entire welding code.

			local Weld = Instance.new("Weld", Player.Character)
		Weld.Name = 'ControllerWeld'
		Weld.Part0 = Cannon.Carriage.Weld
		Weld.Part1 = Player.Character.HumanoidRootPart
		Weld.C1 = Player.Character.HumanoidRootPart.CFrame:inverse()
		Weld.C0 = Cannon.Carriage.Weld.CFrame:inverse()
1 Like

Maybe what is happening is that the weld still exists and that it has to be destroyed first? I don’t know, I haven’t tried that yet

1 Like

What if u would destroy the weld before killing the player inside of turret?

1 Like