In my game I have one map where there aren’t surrounding walls. This means I can’t hide the ugly outside of the lobby. How should I go about hiding the lobby from the players?
You could always just move it farther away.
True, but preferably I’d find another way. For example: something I thought about is making all the lobby parts very small amounts of transparency and adding a glass block near the lobby. However, it’s not a good idea to rely on such “bugs”.
I mean moving it farther away, and I’m talking like 100,000 studs, is what most games do. It will not render on the screen as it is too far, and you don’t need any bugs or fancy scripting to replicate that behavior.
So are players still going to the lobby during the round? As in, do players die and get teleported back to the lobby? If not you could clone it and remove it when the round starts then right before it ends clone it back in.
Edit: But yeah moving it far away is probably way more efficient
Edit2: Grammar
This is pretty close to what I would recommend (and used in Ultimate Boxing). Instead of that, you set the Parent
of the lobby to nil
when it should be hidden and set it back when it is needed locally. This allows for changes to the lobby to still be replicated to the client if something changes. It also consumes a lot less resources then constantly calling Model:Clone()
.
As previously stated try moving the lobby further away , putting it under the map. Destroying it and cloning it would not work as if a player joins while a round is in progress then they will be voided
Players only are there during intermission, also that sounds like a good idea. There are some important parts of the lobby like the shop opener brick that would stay but the main parts would be moved or destroyed.
As already mentioned, what is the case where a round has already started and a player joins the game. Where will they go?
I just realized I forgot to put the word “locally” in my original post. The intended implementation would be to show/hide the lobby on the client using a LocalScript so it can be hidden for a certain player while being visible to others. It would be a problem if the server was hidden on server for players.