Add better support for the workflow of grouping by feature

As a Roblox developer, it is currently too hard to fully group a feature together under one parent.

A workflow pattern I value very highly and would like better support for is the ability to group by feature. What I mean by this is all assets relating to a feature in my game–scripts, remotes, assets, ui–are grouped together under one parent.

For example, say my game has melee combat. For this feature, I need server-side validation to make sure the player could harm another, client-side handling for animations and damaging locally first, at least one RemoteEvent to allow these scripts to communicate, and potentially some UI and other assets.

Right now, server code has to go in ServerScriptService, client code in StarterPlayerScripts, and anything else in ReplicatedStorage. This is a common workflow on Roblox, but the fact that everything is split up means you lose a lot of context to which script is using which of your assets. You don’t have an easy, visual guide to what a Script/LocalScript makes use of without digging into the source. This also doesn’t scale well if you want to have a new Script for each feature, as your services start getting cluttered with many different scripts.

This process also takes a lot of brain power for me. If I’m in my server-side damage Script, I have to recall several different things. Where is my client code? Where are my assets? Where is all the UI relating to this feature? Even if each individual asset is stored in a fairly uniform manner between each feature, it can be a lot to recall in the moment. If all of those questions could instead be answered with “script.Parent,” that would reduce a lot of fatigue for me.

In essence, if Roblox is able to address this issue, it would improve my development experience because it would remove the need to look back and forth between ServerScriptService, ReplicatedStorage, and StarterPlayerScripts. Instead, everything I care about for a feature would be neatly packaged together in one location, reducing context switching.

2 Likes

That is what ReplicatedScriptService will be for. https://developer.roblox.com/en-us/api-reference/class/ReplicatedScriptService

It will be a container for both server scripts and local scripts to run in.

It’s not released yet though. But I disagree with this. This will incentivize developers to be lazy and put everything into one container which makes things less organized. My server scripts are always going in ServerScriptService, my LocalScripts will always be going in PlayerScripts. There should always be separation between server scripts and local scripts imo. The player character is different case though.

1 Like

That’s what collection service is for. It’s not 100% straightforward like drag and drop parenting and it doesn’t have a fancy UI, but it does cover your request.

Those are services and they do as their name implies. They are grouped by function, not ease of access.

ReplicatedScriptService is what I want but unfortunately I’ve heard it’s going to be in limbo for the foreseeable future, maybe indefinitely. As such I’m hoping this post can act as a story for why it’s important.

Putting related content in one container is a valid approach to development. It’s commonly seen in the webdev world especially. If a developer wants to structure things in a specific way, why limit them due to your preference? It’s just another workflow.

1 Like