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

Can I execute a function without waiting?

Asked by 10 years ago

Is it possible to call a function and then proceed to the next line before the function is over? I want this for a gun recoil script. E.G.

function recoil()
--Make the gun go up
wait(1)
--Make the gun go down
end
end

 script.Parent.Activated:connect(recoil)

This script will make it so you cant shoot more than once a second, how would I fix this?

2 answers

Log in to vote
1
Answered by 10 years ago

wait() ?

0
No, I want it to take a while for the gun to go back down. jinxsimpson 0 — 10y
Ad
Log in to vote
0
Answered by
Spooce 78
10 years ago

wait(0.01)? Can I see a bigger portion of the script?

0
Your answer is the same as the one above, and I have lost the script. I just want the question answered jinxsimpson 0 — 10y
0
Are you using CFrame? Spooce 78 — 10y
0
Yeah jinxsimpson 0 — 10y
0
Can I see the lines that include CFrame? Spooce 78 — 10y

Answer this question