How do I run a script on only 1 server?

Hi! I have a script that I would only like to run once regardless of how many servers are running. So if there’s 10 servers running I just want to run this script on one of those servers. How would I accomplish this?

Unfortunately, until a future update, game-level scripts (that is, scripts that run in a single, shared instance separate from any specific servers) are not currently possible.

Depending on precisely what you’re trying to do, you can implement your own HTTP server and use the HTTPService to communicate with it. You can also have a script running in Studio with a connection to the live DataStores for a game, although I don’t know if the MessagingService would work the same way.

You could instance a script into a specific place in your game while you’re in that one server using a custom chat command, but that would over-complicate things. Otherwise, there’s no way to do that yet.