Hi there so I am learning to script and I was able to come up with this for a random spawner basically like blox fruits where the part spawns on random parts around the map to give you powers.
I am able to clone the parts and i am getting the positions i need but the parts that are being cloned are not actually being placed where they should be they are only being placed at 0,0,0.
help please here is the code below
local orbs = game.Lighting.Orbs:GetChildren()
local positions = game.Workspace.OrbPositions:GetChildren()
for i, v in pairs(positions, 1) do
pos = v.Position
print(pos)
end
for i, v in pairs(orbs, 1) do
wait(5)
local cloned = v:Clone()
cloned.Parent = game.Workspace
cloned.Position = Vector3.new(pos)
end

1 comment
pairs() only takes one argument