rojo-rbx / rojo

Rojo enables Roblox developers to use professional-grade software engineering tools
https://rojo.space
Mozilla Public License 2.0
939 stars 176 forks source link

Struggling to use *.model.json to order files #326

Closed CodePidgy closed 4 years ago

CodePidgy commented 4 years ago

In my src/server folder, I've created a file called server.model.json that should gather up the scripts located in the scripts folder from the same directory.

server.model.json contains the following:

{
    "ClassName": "ServerScriptService",
    "Children": [
        {
            "Name": "Server",
            "ClassName": "Script",
            "Path": "src/server/scripts/server.lua",
            "Children": [
                {
                    "Name": "Module1",
                    "ClassName": "ModuleScript",
                    "Path": "src/server/scripts/module1.lua"
                },

                {
                    "Name": "Module2",
                    "ClassName": "ModuleScript",
                    "Path": "src/server/scripts/module2.lua"
                }
            ]
        }
    ]
}

However, when pushed to Roblox Studio, all of the scripts are there but completely empty. Am I doing something wrong? Also, the documentation isn't too helpful with this.

LPGhatguy commented 4 years ago

Discussed this over Discord. This is generally not what .model.json files are for, and we recommend using the filesystem hierarchy instead.