Why arent these module functions running at the same time / how do make them run at the same time

i have a while true loop that runs 3 functions from 3 different moduels (used to be one, it had the same outcome), and when i run those 3 commands, it executes them like a sequence, with delay, and i want them all at once, how do i fix this?


as you can see in the video, first comes the ring, then the crater, then the pebbles, instead of them spawning all at once (the visual effects are client sided)

They are not running at the same time because you propably wrote it like this

firstEffect()
secondEffect()
thirdEffect()

They are running in the same thread, that means when firstEffect() is run, script will wait until that effect is done, same with second and third.

To fix this, you need to create separate threads for these effects to run it
simultaneously

task.spawn(firstEffect)
task.spawn(secondEffect)
task.spawn(thirdEffect)
1 Like

Any of these functions are yielding the loop

you did not only predict how i wrote my code, but also fixed it, thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.