Ok, you might be questioning what I mean by the title, let me put it this way: You have made a train in roblox, but want a railroad crossing that activates ONLY when the train is coming, not when a player presses a button or steps on something. in other words, automatic.

5 comments

0

Might need a RemoteEvent for that, which is sending the server to the client by firing. You can check it out here: https://developer.roblox.com/api-reference/class/RemoteEvent

0

Provided you are handling replication well, there is no need for any remotes here. OP, is there anything fundamentally wrong with just running a spawn or coroutine thread from the server when your train is coming, and stopping once the train has passed?

0

maybe try a bindable event

0

You could either have an event that fires when the train gets close, or have a loop checking every few seconds the distance from the crossing to the train using magnitude.

0

Thanks guys, I'm no good with scripts and i'm making an extremely basic car game, I have no idea what any of this means but I will try to figure it out and get back to you once I have, cheers!