I’ve been searching for a while and couldn’t find anything on this, most likely because I’m terrible at searching for things. I may not describe this very well, so apologies for that.
I’m trying to pause the script without pausing for i = 0, 10, 1 do, eg. create an object in all children, then remove it 1 second later, without stopping the whole script, or using :GetChildren() to delete them all.
for i = 0, 10, 1 do
-- create object
wait(1)
-- delete object
end
So far everything I’ve tried, coroutines and tasks, will still continue to pause the entire function. (Admittedly, I barely have any idea on how they work, but so far they seem to get pretty close to working, they just pause when I do task.wait(), or anything else involving waiting.)