Having trouble synchronising two scripts: a timer with a vehicle shuttling conveyor system

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want to achieve a timer system for my aerial tramways that is synchronized with them.

  1. What is the issue? Include screenshots / videos if possible!

The issue is that the aerial tramway always departs a few seconds too early or too late, despite the two scripts having the exact same waiting system

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

So far i tried making the two scripts depend on eachother, i tried making every script wait a few seconds before starting, nothing worked.

The whole system consists of a line of conveyors that carry the cabins. every X amount of time, they change directions, but the timers are always ahead or behind for some reason.

Here you can understand the issue better and see the scripts: https://www.youtube.com/watch?v=9dLRIbtdKz4

(every conveyor has the same script except the end ones that have the wait(1). I clicked on an end conveyor, the others dont have the wait(1).

1 Like

If both your scripts are on the same side of the network, you can use os.clock or tick, and just subtract from the current clock/tick every update to check how much time has passed

If one is client and one is server, check out Suphi Kaner’s video on syncing client server time https://www.youtube.com/watch?v=FfCs6ASfcuc

Also now looking over your video, if you have a central “Timer” script or whatever that plays the beep sound, you could just send a Bindable/Remote event and have it all synced up

1 Like