Help creating scripts using Rojo + Visual Studio Code

Recently I’ve started to use Rojo and VisualStudio for Roblox, however I’ve come across an issue. Whilst trying to create script instances and folder instances in VS Code (which replicate to studio), I can’t find a fourm/document that explains what to name them to achive certain types of scripts or create folders.

Example of what I’m talking about:

Server Script: name.server.lua
Local Script: name.client.lua
Module Script: name.lua

You can make a folder and make a file called either init.(server/client).lua and that will make a script with the name of the folder. To put children in that script, you can add them to the folder.

Making a folder on your machine that doesn’t have any files called init will result in a folder in Roblox

1 Like

Tysm bro! charcharsyesyyesreal

1 Like

One more thing, does it matter if I put “luau” at the end of the file name? Does it make a difference?

1 Like

I don’t think it does, I usually use .lua but .luau would work fine I imagine

Sorry, one last thing. When I’m trying to create a new file in the src section, instead of putting the file inside it adds it to the name of the file I’m trying to put the folder into. How can I fix this? Eg:

I’m not fully understanding your question but if I’m understanding correctly that’s just a VSC thing.

image
image

It just compacts it into the same line to keep it tidy.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.