Level loader (Map loader) | Make switchng maps easier! [VERSION REWRITE1.1]

here to remake the whole thing because i completely forgot to publish the MASSIVE rework of the module

What is this ?

This module will let you switch maps easily! With only one command to load a level !
Warning : This module might be slow if you’re loading huge maps

How to use this module ?

Very simple

  • STEP 1 : Create a map in the workspace and configure the lighting
  • STEP 2 : Execute this script into the console
local m = require(game.ReplicatedStorage.MapLoader) --Replace this by the location of your module 
m.CreateLevel("LEVEL_NAME")

You will find the output in here : game.ReplicatedStorage.Level.[MAP NAME]
image

  • STEP 3 : After creating the map OR multiple maps, you can switch between them by doing
local m = require(game.ReplicatedStorage.MapLoader) --Replace this by the location of your module 
m.LoadLevel("LEVEL_NAME")

INFO : The line above can be executed in the console OR in a script (server script / local script works), unlike the CreateLevel function


MODULE LINK :

Map Loader Rewrite [REWRITE1.1]


if you have any feedback or questions, feel free to tell them in the comments !
now bye

JaaJ.

8 Likes

This is a W module good work bro

patrick-bateman-american-psycho

1 Like

Does this switch on the client or the server?

Would be nice if it was client based, and zoned based, so when they go into different zones, on the client , the skybox and lighting changes.

Also do you have a .rbxl file to check out ? or editable game?

Thanks

I’m gonna send the .rblx file when i have time

and it switch on the server

but i will maybe make it switch on the client on a future update

edit : I already planned to do it on a future update

1 Like

Make a github repository for this so people can check the code without needing to get the model.

Okay, there’s a new update for the module

it’s gonna be here

whats goin on here lol

for i,v in pairs(Levels) do
local count = 1
print("Level"..count.." name : "..v.Name)
count+=1
end

it should be

for i,v in Levels do
print("Level"..i.." name : "..v.Name)
end

Lighting loading is also kinda odd, you could use my module for it (found within the plugin)

you do alot of loops trough the levels list to find appropiate data but you could just do

local levelData
for _,level in Levels do
if level.Name == levelName then
levelData = level
break
end
end

levelData.Map...

you also lack a break in the loops
You could further improve the module by letting the server fire a remote to all clients to load a certain map, ontop of this each maps could be split into 2 folders, one being the static map that doesnt change and one for objects that need to present on both the client and server

gonna try to see what i can do
not guaranteed that i can do it since i’m not really a good scripter lol