function waitt() wait(10) end value.Changed:connect(function() blah blah blah blah just some code waitt() blah blah end
so you see on where I call the function waitt()? How would I continue the script without having to wait for the waitt() function to finish?
When you call the waitt()
function, put it into a spawn()
function, so it should look like this:
function waitt() wait(10) end value.Changed:connect(function() blah blah blah blah just some code spawn(waitt()) blah blah end
Honestly, I have never used the spawn()
function before, but im 99% sure that this will achieve what you want to do.
Alternatively, you can do coroutines:
function waitt() wait(10) end value.Changed:connect(function() blah blah blah blah just some code local coro = coroutine.create(waitt) coroutine.resume(coro, 'whatever parameters u want for waitt() go into here where this string is') blah blah end
Again, I have never used coroutines, however I have read about them and I'm also 99% sure that they will achive the desired effect for you :D