How do I weld tools to the back of the player when the tool is unequipped?

as stated in the title i need a clone of the tools handle attached to the back of the player with welds and when its re-equipped it gets deleted, i know how to use tool.Unequipped ect but how do i make it weld?

2 Likes

Try welding an invisible part to the HumanoidRootPart. From there, try making a script that would clone the mesh and weld that to the invisible part

i have no clue how? i dont know how to position it ect…


This is a comment someone posted on a similar topic. You also could create an attachment at the back of the player and on the weapons handle.

doesnt really help, i kinda need a guide on how a script makes it work…

You would have to look on Youtube for that. We can’t give out full systems or scripts. Sorry!

i have looked on youtube nothing helps

1 Like

and i dont want a full script, i just need help understanding

1 Like

Personally, when i have made tool unequip welds, I listen for when it is removed using ChildRemoved() then checking if the child is a tool. If it is, i create a new weld, or use an already existing weld in the tool model, and then set the part0, and part1 of the weld.

this is the code i used, ignore the anim parts if u dont wanna play one (this code is very old)

[server script]
local function unequipweapon(tool) -- unequiped child
	local weapon = character:FindFirstChild("RealWeapon", true).Parent -- realweapon is a stringvalue

	if tool:FindFirstChild("PrimaryWeapon") then --// str val/ check if its a primary weapon (weapon that you m1 combo with)
		local unequipanim = humanoid.Animator:LoadAnimation(anims:FindFirstChild(tool.PrimaryWeapon.Value.. "Unequip")) -- ignore this if u dont want anims
		local equipweld = weapon.EquipWeld
		local weld = weapon.Weld
		if weapon and equipweld then
			if idleanim then idleanim:Stop() end
		
			unequipanim:Play()
			unequipanim:GetMarkerReachedSignal("Unequip"):Connect(function()
			weld.Part0 = character["Torso"]
			weld.Part1 = weapon.Handle
			equipweld.Enabled = false
			weld.Enabled = true
           end)
		end
	end
end

a video showing what it does (old af game)

External Media

when i tried that it would be in a different position…

You have to change the C0 or C1 cframes