Setting up the backend
Similar to when creating the obby, the backend of the experience should be created to be modular. As before, we will be creating a main server-sided script called ServerHandler
, which all server modules will be under. So you do not need to refer back to the previous chapter. The code that should be in the ServerHandler
script is included here:
for _, module in pairs(script:GetChildren()) do
if module:IsA("ModuleScript") then
task.spawn(function()
require(module)
end)
end
end
Moving forward, we will be introducing the modules that should be added to the ServerHandler
script to create the main functionalities of the experience. As with the previous chapter, you are encouraged to test each system you make, assuming said system is not dependent on one you haven’t yet made. Testing throughout the development process not only ensures you do not have bugs but is motivating as well! Next, we will set up...