Help with welding a projectile to a player

  1. What do you want to achieve? I want to weld a projectile to a player

  2. What is the issue? It welds a player to projectile

  3. What solutions have you tried so far? I tried to look at youtube but didn’t found any helpful video

How would I weld a projectile to a player??
(Also if it is not the correct category then tell it and I will move to the correct)

The script that I tried

	local weld = Instance.new("Weld")

	local HRP = player.Character.HumanoidRootPart

	weld.Part0 = HRP

	weld.Part1 = kam

	weld.Parent = script.Parent.Handle

set the parent to one of the parts welded

What do you mean can you explain more in detail??

weld.Parent = HRP or weld.Parent = kam

Not helping robloxapp-20210222-1840551.wmv (856.9 KB)

if this projectile is already in the workspace then why not use the studio interface to create a weld constraint instead of using a script?

1 Like

Yes it is good idea but how would I set HumanoidRootPart though the workspace?

oh in that case you have to do it through the script

Yes, but do you have any ideas how to fix it?

Change this line:

local weld = Instance.new("Weld")

to this:

local weld = Instance.new("WeldConstraint")

I tried it but I can’t move when I equip the tool, HumanoidRootPart is not anchored

	local weld = Instance.new("WeldConstraint")

	weld.Part0 = HRP

	weld.Part1 = kam
	
	weld.Parent = kam