I’m not sure how to explain this, but I have a script that changes a few parts position and I want to position them where other transparent parts are and they’re called Item1, Item2, Item3, Item4, Item5 and Item6. So every time the for i, v in pairs() do loop fires, the i value will go up by one and then I can use that to do something like "Item"..i but this doesn’t seem to be working, here is my script:
local items = game.Workspace.Items:GetChildren()
game.Workspace.PlaceItems.ProximityPrompt.Triggered:Connect(function()
if #items > 0 then
game.Workspace.PlaceItems.ProximityPrompt.Enabled = false
for i, v in pairs(items) do
print(v.Name)
print(v.Position)
print(i)
v.Position = game.Workspace.ItemPositions."Item"..i.Position -- I need help on this line.
print(v.Position)
wait(1)
end
game.Workspace.PlaceItems.ProximityPrompt.Enabled = true
print("Finish")
end
end)