Level loader (Map loader) | Make switchng maps easier!

I know it’s such a small thing but i just wanted to try making something useful :slight_smile:

What is this module ?

You know when you want to switch between map, you have to script everything and everytime you want to switch maps like the lighting, and the map

With this module, only one line of code and it’s done ! The script is switching maps automatically

How to use it ?

To use it, you have to first call the module

local LevelLoader = game.ReplicatedStorage.LevelLoader

Create a new level with this :

LevelLoader.CreateLevel("LevelName")

Then, execute this command which will load the map and the clouds if enabled

LevelLoader.loadLevel("LevelName", true) --"LevelName" is the name of the level you want to load and the "true" is if you want clouds or no

Video of the module being used :

More info

Updates

VERSION : 2.0.0

+ New module function : .CreateLevel(NewLevelName)
+ Reworked the loading system
+ Finally added terrain support
- No removed content for now

FUTURE UPDATES
None

Credits

Me (@nonoah0001) : Making the module
@ShaShxa : Helping fixing a bug
(DevForum | Problem with :GetAttribute() function)

LINK (Level Loader (or Map Loader))

Opinions ?
  • Good module tbh
  • Can be better
  • Bad

0 voters

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