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