My cframe isn't spawning in the right place

My cframe isnt working, its not going to the right place even when i put it at 0,0,0 but when i remove it, it puts it at the correct place

The script

	local POS = HumanRoot.CFrame
	local c = player.Character
	local FloorMaterial = c.Humanoid.FloorMaterial
	local x = game.ReplicatedStorage.Fakeleg:Clone()
	x.Parent = player.Character["Right Arm"] 
	x.CanCollide = false
	local wx = Instance.new("Weld", x)
	wx.C0 = player.Character["HumanoidRootPart"].CFrame * CFrame.new(0,0,0)
	wx.Part0 = player.Character["Right Arm"] 
	wx.Part1 = x
	end)```

First of all, format it right.
Second of all, make it a Lua code block.

	local POS = HumanRoot.CFrame
	local c = player.Character
	local FloorMaterial = c.Humanoid.FloorMaterial
	local x = game.ReplicatedStorage.Fakeleg:Clone()
	x.Parent = player.Character["Right Arm"] 
	x.CanCollide = false
	local wx = Instance.new("Weld", x)
	wx.C0 = player.Character["HumanoidRootPart"].CFrame * CFrame.new(0,0,0)
	wx.Part0 = player.Character["Right Arm"] 
	wx.Part1 = x
	end)```

It’s because it’s hard to help you without you using codeblocks. At the beginning and end of your script, please three of these ` characters, and it’ll turn it into a readable codeblock.

The reason the CFrame isn’t positioned as you intended it is because you’re using a Weld and setting the C0 to the HumanoidRootPart’s CFrame. Which is essentially the same as doing:

HumanoidRootPart.CFrame:toObjectSpace(arm.CFrame)

You need to set the Weld C0 to CFrame.new(0, 0, 0) if you want it to be centred to the arm’s centre point at 0,0,0.

this doesnt work sadly thanks for trying

Can you show me what you’ve written in your updated code? Can you explain what doesn’t work? Can you explain what you mean by 0, 0, 0?

Read the rules of Scripting Support, if you want help I and others are more than happy to provide it but we can’t do much unless you provide relevant information.

I control z’ed also i dont know if i was doing it correctly because im confused on when you said

You need to set the Weld C0 to CFrame.new

oh god im such an idiot thanks for the help this worked much love from me