Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make something in an onClicked function go back without a time limit?

Asked by 8 years ago

I understand the basic way to do the CFrame would be:

function movingblocks(onClick)
    part.CFrame = part.CFrame + CFrame.new(0, .1, 0)
    wait(1)
    part.CFrame = part.CFrame + CFrame.new(0, -.1, 0)
end

but how would it to return on the second click so that the wait(1) doesnt have to be there

Answer this question