I wanted to make two scripts run at the same time. I have a script that is going to pick a random tower/obby and another timer script. Those scripts are separated so I added a wait(480) command on the random tower script and the timer is 8 minutes.
However, most of the time the random tower script runs first and so, it will regenerate the tower when the timer is still on 0:12 (or less or more). Are there any ways to fix this problem?
You could always create two different scripts but one of them have a wait and when the wait finished the script runs. Also I would say you should add two waits on both of the scripts and it should stop your problems.
Either use BindableEvents and fire them whenever you need something to happen in the other script, or put them in the same script and use coroutines (I recommend this option)
You could use a RemoteEvent, for example, if one script starts, then that script will fire an event, if that event is fired, then the other script will get that event and run the script.
RemoteEvents are for Client to Server or Server to Client communication. BindableEvents would be appropriate for this scenario because I am assuming he is talking about two Server Scripts.
You can use spawn, but I discourage it due to there being a delay before the function runs and the delay can vary depending on lag. Therefore, I would recommend using coroutines as they do not have a delay.