Having trouble with welding a part to player

So I’m having some trouble with welding a special vfx mesh to the player’s humanoidrootpart. But for some reasons it turned out like this:


Here’s the piece of code that handles the welding:

	local char = Player.Character
	local humrp = char:WaitForChild("HumanoidRootPart")
	local ball = game.ServerStorage.Effects.LightningBall:FindFirstChild("Ball5"):Clone()

	local weld = Instance.new("Weld")
	ball.Parent = workspace
	ball.CFrame = humrp.CFrame * CFrame.new(0,0,-3)
	weld.Parent = humrp
	weld.Part0 = humrp
	weld.Part1 = ball
	weld.C0 = humrp.CFrame:Inverse()
	weld.C1 = ball.CFrame:Inverse()

I don’t really know what’s happening, please help.

Maybe try switching to WeldConstraint?

Why are you setting C0 and C1 to CFrame Inverses? I dunno why you are doing that why not try humrp.CFrame and ball.CFrame?

So I figured out how to fix it myself:

		local weld = Instance.new("Weld")
		local folder = Instance.new("Folder")
		folder.Name = "LightningBall"
		ball.Parent = folder
		weld.Parent = humrp
		weld.Part0 = humrp
		weld.Part1 = ball
		weld.C0 = humrp.CFrame:Inverse()
		weld.C1 = humrp.CFrame:Inverse() * CFrame.new(0,0,3)