Hello. I'm trying to make a platform (like the one in Mining Tycoon) that can trasnport objects (such as small 1x1x1 bricks) from point a to point b. I've tried using BodyPosition but it just made the platform freak out. I'm now trying making the platform move up small amounts. Here's the script:
num = 0
up = false
part = script.Parent
waittime = 0.01
go = false
bg = false
function Move()
go = true
if bg == false then
while up == false and go == true do
bg = true
num = num + 1
part.Position = part.Position + Vector3.new(0,0.1,0)
if num == 100 then
up = true
go = false
end
wait(waittime)
end
while up == true and go == true do
bg = true
num = num - 1
part.Position = part.Position - Vector3.new(0,0.1,0)
if num == 0 then
up = false
end
wait(waittime)
end
bg = false
end
end
script.Parent.ClickDetector.MouseClick:connect(Move)
The problem is that it just drops the bricks that are on top of it under it.

3 comments
Try using BodyVelocity
You are going to have to weld the bricks on top of the platform while it's traveling up and delete the weld when it's done transporting.
Undeniable's answer is a serious option you should consider. You could also use Body Position with Body Gyros.