For i,v loop acting weird

for some reason when I trigger this function instead of the backpack with the owner value of the player going to the part with the owner value with that player, it just goes to random parts or use a rondom backpack without an owner value can someone please help me?

game.ReplicatedStorage.Values.StoryValues.GetBackpacks:GetPropertyChangedSignal("Value"):Connect(function()
	for i,v in pairs(game:WaitForChild("Workspace").HouseMap.Backpacks.BackpackParts:GetChildren()) do
		if v.Owner.Value ~= nil then
			local owner = v.Owner.Value
			print(owner)
			local partPos = v.CFrame
			for i,v in pairs(game:WaitForChild("Workspace").HouseMap.Backpacks.Backpacks:GetChildren()) do
				if v.Owner.Value == owner then
					v.CFrame = partPos
				end
			end
		end
	end
end)

What is this actually supposed to do? You would need to post the part of the workspace this operates on and explain it a little.

when the the function triggers all the players who are not seated neet to be teleported into one of the seats no one is sitting in

This only makes sense if I know what seats you’re talking about. Theres nothing in the code that mentions seats or players.

Could you explain what you are trying to do?

Have you add a break inside the loop because if you don’t what is so when you insert break inside the loop, this will stop the loop.

Here a sample of it.

for i,v in pairs() do
break
end

it just doesnt do anything it doesnt telport the player or anything when I change the value it doesnt even print triggered for some reaseon thats weird

oh wait I fixed it but now theres an error with

if character.Humanoid.Sit.Value == false then