✓ Accepted answer
when the first loop begins running, it will run forever and the second loop won't continue, you can merge them together:
while task.wait() do
script.Parent.Velocity = script.Parent.CFrame.LookVector * 3 + script.Parent.CFrame.UpVector * 3
end
Okay, then you can create a new thread, this will run independently from the rest of the script, you can do that using task.spawn:
task.spawn(function()
while task.wait() do
script.Parent.Velocity = script.Parent.CFrame.LookVector * 3
end
end)
while task.wait() do
script.Parent.Velocity = script.Parent.CFrame.UpVector * 3
end
4 comments
sorry they r not connected
I edited the script, I am not sure if this is what you expected though since the first loop will change velocity and the second one will change it again instantly it's kind of weird
its not the looping I'm worried about, I'm just comparing them. The horizontal 1 works but the vertical 1 doesn't. they r seperate scripts
vertical one does not work possible because only parts that are "standing" on top of the conveyor part can move, if you are going to increase the multiplier for UpVector for example UpVector * 20 you will see that the parts on top surface of the conveyor are jumping, you can fix this by using body velocity for parts that touch the vertical conveyor