Possible to move multiple parts to random spot?

I was just wondering if it would be possible to move multiple parts to complete different places using 1 function, and even if this is possible what would be a method to do this?

I’d suggest moving your post to #help-and-feedback:scripting-support so it doesn’t get taken down.

Yes, it is possible. But please move the post to Scripting Support - DevForum | Roblox

Yes, it is :

local parts = game.Workspace.MyParts:GetChildren()



spawn(function()
	while true do
		for _,part in pairs(parts) do
			if part:IsA("BasePart") then
				part.Position = Vector3.new(math.random(-500,500),math.random(-500,500),math.random(-500,500))
			end
		end
		
		task.wait(1)
	end
end)

this is a very basic example.

image

1 Like

Ok thank you because any other method I used I just kept getting errors so I made tried seeing if it was possible.

Ofc you could change (-500,500) to 2 numbers that a number would be randomly chosen amongst them