local movingPart = script.Parent
local function move()
movingPart.Position = movingPart.Position + Vector3.new(0, 0, .01)
end
while true do
move()
end
I had a longer version before and it worked just fine. A few minutes later I tried to run it and it says the script has been running for a long time and then asks me to kill or break the script. I even opened up a new Place on studio and it still wants me to kill it. Do you know whats wrong?
You need to add a wait() timer for your loop, otherwise it will loop it without time in between, making it go for infinite.
local movingPart = script.Parent local function move() movingPart.Position = movingPart.Position + Vector3.new(0, 0, .01) end while true do wait() --Small wait between loops move() end
Also for future questions, select over the code you have and click the code block (lua symbol) to turn your text into RBX lua!