How to let 'Lobby' know that round in another place has ended?

Hi everyone,

Here I am again with a question that I can’t find the answer to. I have a game with a lobby with a functional voting system. You can vote for a map (a place), most votes win and everyone gets transported to that place. That all works perfectly.

For now I have one place (The Graveyard), a survival map, once you die (by zombies) you get transported back to the lobby. So far it works perfectly. So the round in the place ends either after a set countdown (6 minutes) or if everyone has died.

Now my question is, how do I let the lobby know that the round has ended in place ‘The Graveyard’. I’ve read about the MessageService, but that works Universe-wide, so if I would have a lot of players with multiple servers and hence multiple lobby’s and graveyards it would end each game everywhere, regardless of its state.

So to summarize, how do I tell the lobby that a round in another place else has ended? Maybe I think too difficult?

Thank you in advance!

Hi, I think I have an idea but it might not work but we’ll see. So u could maybe add a folder in workspace and once a new round starts u just parent the players in the folder and when they die they get removed. Once everyone is dead/removed you could just stop the round by just detecting if the folder is empty. Another thing u can do is to add teams and when a certain team is empty you could just stop the round!
Hope this helps a bit!

3 Likes

Let me know if it works! Kinda curious myself haha!

1 Like

I will! Just waiting to see if there are any other suggestions, I like the team-idea though! Thank you for your reply.

Maybe try using Game.JobId? that displays the running server’s id.
For private reserved servers, you can just use Reserved Server Code.

1 Like

Alrtight then, hope u succeed with ur project then!

Hmm interesting, never heard of it!

Very confused on what you’re trying to do…could you explain a little more?

All I see is that you should look into these services:

Oh I think u misunderstood a bit. So he has a working round system that counts down from 6 minutes to 0 and a new round starts “When the timer runs out”. Now one of the maps include zombies that kill the players. So when all the players die the round is still gonna count down. what he is trying to achieve is to break the round/loop so that a new round can start.
Hope you understood now!
/Primal

Why did he look into MessagingService then? It seems that some cross-server communication is happening, but I don’t understand why:

Oh he means like a map in the baseplate. All of this is happening in one and same server, just one independant place

If it’s in another game then please resort to using MessagingService as @bluebxrrybot said!
Otherwise if it’s in the same server create a Bool value in the workspace that will change its value based on if a round has ended or not.

make a new gui show that shows to all players that the round has ended, should work pretty fine

I’m sorry if anything is unclear. Basically what I’m asking is how to communicate between Place B and my ‘home Place’ which in this case is my Lobby.

@laughmank was right, I’m simply trying to let my Lobby (which is also a place in my game) know that the round in some other place has ended (no matter for what reason it ended, because everyone died, or the round timer was up).

That is why I resorted to MessagingService, I know that can send a message ‘round over’ from Place B to A (and I mean literal places here). But that works Universe wide so if on server X in Place A the game would be over, and I use MessagingService to tell Place A that the round in Place B is over (so indeed the voting etc and a new round can start again) this would mean that I have multiple servers, EVERY place B would be told that the round was over, even if on other servers they are still playing.

I notice that I find it very hard to explain correctly. The Bool idea that @ViridianDevil suggested is a great idea but still I would need a way to KNOW that the round has ended in another Place.

Let me know if you guys need any more clarification and thank you for responding everyone!

1 Like

Thank you for your time for clearing it up for the others! Yes the Boolean value idea is indeed a good idea, personally I haven’t used Boolean values for detecting players but it actually should work according to my calculations. Otherwise I think the folders with the player and teams should definitely work!
//Primal