How do you make different places for different maps

How would you implement a map system where the player chooses a map in the main game, and then when they choose that map it moves them to a different place? For example:

Main game
-Place 1
-Place 2
-Place 3
Player chooses place 2 and then it teleports them to place 2.

I’m asking this question because I feel like you would have to rewrite the code for each place, right? Is there a way to use the same code in between all the places? Because the only thing I want to change for each place is the map.

Note: I was originally going to store the maps in ServerStorage and then load each map based on whichever one gets picked, but the maps have terrain on them, so I have to separate each map into a different place

1 Like

https://create.roblox.com/docs/reference/engine/classes/TeleportService
You can use TeleportService to teleport players to different places.


This is not my video but it’s useful.

Thanks, but I know you’d have to use teleportation service, my question is about sharing the same codebase between each place, so that I don’t have to rewrite everything in each place. The only thing I want to change between places is the map, I want all the code to be the same

All places under the same game share the same data.

You can use packages. It allows you to make changes to Instances (including scripts) under some ancestor (like a folder or model) and have the changes easily sync-able across places. There’s an Update All feature that dispatches a package update to all places that use it and saves them. You’ll still need to publish each place once it’s saved.