How do i create a map changing system similar to Robot 64?

Hello devs!

I’m trying to know how to create a map changing system like robot 64. Which is, Players inside of a specific map will be the only one that you can see.

The rest i already know how to make.

I’ve been trying to have an idea how to create something like that.

Do you mean how to load in and load out terrain?
If not, do you mean a map made out of parts?

1 Like

I’m not really sure if I understood what you’re trying to do right but maybe you can have all the players teleport to each map and make all the other maps transparent.

Yes! a map made out of parts but, Hide the players that are currently on that map.

I’m trying to figure out how to do that rn but i’m having so much problem on figuring out

Uhh, maybe you did not understood what i said. I’m trying to make the players on the localplayer’s current map visible while the others invisible.

  1. Right yeah, so if you a map, make it into a model. After that, put an invisible part inside the mode, center of the map, afterwards, make that part the PrimaryPart of the model.
  2. Make the same part, but leave it in workspace.
  3. Set the model ServerStorage.
  4. Make a script with this code:
local newMap = game.ServerStorage.MapName
local CenterPart = game.Workspace.CenterPart

local checkifMapAlreadyExists = game.Workspace:FindFirstChild("MapName")

if checkifMapAlreadyExists ~= nil then
 checkifMapAlreadyExists:Destroy()
else
local newMapInWorkspace = game.Workspace
newMapInWorkspace:SetPrimaryPartCFrame(CenterPart.CFrame)
end

That was not the solution i was looking for…

I already know how to create a map changing system, But i need that only the players that are inside of the map that the localplayer is in be visible.

From what I’m getting, you only want players inside the same map as the player to be visible. Not too hard.

You’ll need to be able to get the map of a player easily, probably a StringValue inside the player. Change the value of the StringValue to match the map name whenever they change maps.

Next, whenever the player changes maps, loop through all players using for i,v in pairs(game.Players:GetPlayers())
You want to move players to or from workspace depending on what map.

If the players map is the same as our local player, put their character in workspace player.Character, else, move it into ReplicatedStorage. You won’t be able to see characters in ReplicatedStorage, so it’ll seem like they aren’t there.

Just an example, but it would look something like:

for i,v in pairs(game.Players:GetPlayers()) do
    if v.Map.Value == Player.Map.Value then
       v.Character.Parent = workspace
    else
       v.Character.Parent = game.ReplicatedStorage
    end
end

Obviously this would go in a local script.

Hmm, I will go and script to create a stringvalue inside of the player. If this works, You just made my day.

Seems like my script isn’t working well… Would you be kind to help me with it?

Whats up with it? Any errors, or is it just not working. Send the script and I’ll check it out.

Can i send the rbxl file? it contains lots of stuff

I need to go sleep so, I can send you the file.

mapchanging.rbxl (25.7 KB)

If you want the players to be seen I’d they are in the map, you’ll need to have a system to identify what map each player is on. Then, in a local script, set the transparency of the player’s parts to 1 to those who aren’t part of the map. Parenting those players isn’t recommended and would be a lot more difficult to code so this alternative is best.