I am trying to make a random drop loot. How do I move the created part to the random location?
Do I even need a dropper? How do I just randomly spawn it?
local ReplicatedStorage = game.ReplicatedStorage
local LOOT = ReplicatedStorage:WaitForChild('LOOT')
local DropperPart = workspace:WaitForChild('DropperPart')
local xPos = {500,-540}
local yPos = {200,250}
local zPos = {482,-652}
while wait(math.random(1,10)) do
local m = LOOT:Clone()
local x = math.random(xPos[1], xPos[2])
local y = math.random(yPos[1], yPos[2])
local z = math.random(zPos[1], zPos[2])
m.Parent = DropperPart --[[how to move it]] m:MoveTo(Vector3.new(x,y,z))
game:GetService('Debris'):AddItem(m,90)
end

4 comments
i don't see any problems with the script
but you shouldn't use while wait() use while true do wait(math.random(1,10)) end
he can use while wait() do, except as a legendary programmer once said, its a bad practice to use that since it works mainly on roblox.
Don't arrays start at [0]?