Table Excepted, got nil

I’m trying to make it where my handle go back to the position and rotation it was before it left my hand

function ActionWeld(player, b, c)
	local a = script.Parent.Parent.Parent.LightsaberHilt.Handle
	local w = Instance.new("Weld")

	w.Name = "SaberWeld"
	w.Parent = a
	w.Part0 = b
	w.Part1 = a
	w.C0 = c

end
local HandPos = {
	[1] = CFrame.new(0,-0.85,0) * CFrame.Angles(0,math.rad(-90),0),
}

but this part is saying “invalid argument #1 to ‘pairs’ (table expected, got nil)” how can i fix this issue?

	for i, Saber in pairs(Sabers) do
	ActionWeld(Saber, player.Character.Weapon2,HandPos[i])
	end

There’s no reference to a table called Sabers so it won’t work.

i fixed it now it is saying “attempt to iterate over a number value”

Could you show your entire code?

Same, where the for loop in script?
Can you show how table is created?

How about ipairs(Sabers)?

i solved it on my own thanks for the help