Property for BasePart that removes it from the game without removing it from the place

I use a lot of guides when I build. They help me keep stuff in proportion and reason about large-scale layouts. I want to keep the guides in my game so I can use them if I need to update something. As of now, I just set Transparency to 1 and CanCollide to false. However, the parts still replicate to the client and I think the client still does some work involving them. If so, it’s a bit wasteful so it would be nice to have a property that prevents that.

This property would prevent its BasePart from being replicated to the clients and skip any server-side operations involving the part. It would also prevent scripts from doing anything with the part. It would also prevent direct selection in the viewport in Studio. Selection in Studio would be analogous to selecting something in ServerStorage or Lighting.

Some names I’ve thought of are Active and Enabled.

Really what you want is just for the parts to only appear/exist in Studio, right? There are tons of use-cases for that when it comes to plugins. I’m thinking a better solution would be to create a dedicated container for stuff like this that exists in Studio but not online (e.g. StudioWorkspace) instead of adding another property to every object ever.

The reason I’d prefer to keep them in Workspace is so I can put them into hierarchies with parts that do show up.

It would be possible to write a plugin that can move them between workspace and serverstorage (including parenting them wherever).

But yeah a property wouldnt hurt. We already have archivable, something like that.

The problem is that you’d have to manually move them whenever you publish. An OnPublish callback similar to game.OnClose but for plugins would be nice, but there can only be one of those, so multiple plugins wouldn’t play nicely together.

In fact, just such a plugin already exists, courtesy of @stravant.

2 Likes

Why not just have a server script which traverses the DataModel and removes any of these “guide” parts? That way it will even work when you are doing play solo.

I don’t want them to interfere with selection in Studio in the viewport.

Have you made them locked so they can’t be selected in Studio?

Locked parts still prevent me from selecting parts behind them or inside them.

1 Like

So maybe that should be the feature request: clicking on locked parts doesn’t swallow mouse clicks (perhaps behind a Studio setting).

Use BoxHandleAdornments or something similar. What I do is I create a part at <0,0,0> in the CoreGui and then adorn every BoxHandleAdornment I create to that part origin. Then, I’m free to modify its CFrame, Size, etc like I would a part. It shows up in the viewport, but there’s no part that truly exists there since it’s a BoxHandleAdornment and it doesn’t interfere with the selection. Even if you click at <0,0,0> your selection won’t be messed with because the part is in the CoreGui and doesn’t exist in the workspace. The BoxHandleAdornments can still be parented wherever in the workspace.

2 Likes