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.
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.
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.
Make the same part, but leave it in workspace.
Set the model ServerStorage.
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
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
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.