Give Actors write access to allowlisted instances

As a Roblox developer, it is currently too hard to fully utilize Actors and parallel processing in game creation. The inability of Actors to modify the data model without synchronizing really limits their usability.

If possible, it would be nice to either:

  1. Similar to BasePart:SetNetworkOwnership(), add an Instance and its descendants to the “Actor” even though they’re not in the same hierarchy, and that Actor has write access on the object.
  2. Allow for potentially unsafe reads and writes for an actor given the creator “opts in” to it

If Roblox is able to address this issue, it would improve my development experience because games would be able to execute a lot more code in parallel vs. just with threads. Some use cases of this are:

  • Adding a special Gui to each player’s head that is set / animated client-side
  • Animating a lot of projectiles at once
  • Camera manipulation work placing instances inside the Camera / Workspace

Basically, self-contained tasks that require write access to usually an instance or two, when that instance generally isn’t written to or even read outside of the one script.

7 Likes

Please I need this!!! You do not understand how much this would help my work, I use 3d part based effects and while I can have about 1000 running at 60fps stably in perfect conditions I really need to be able to do this task in Parallel. If I could disperse the load across many threads it would be a massive performance boost! That’s just the tip of the iceberg! Actors could animate themselves if set up correctly, as I use procedural animation for almost everything I do, this could improve the performance of so many things, making each object animated in Parallel. I have been wanting something like this since Parallel Lua was announced! As it stands Parallel Lua is heavily held back by harsh restrictions, this makes it pretty much useless to the average user. With this feature more developers could actually take advantage of Parallel Lua! I’m sure some roblox core scripts could as well for more performance!

I can think of 1000000 ways to use this, and would use it constantly, please consider adding something like this, where an actor can take control of instances. Even if those instances are read/write locked to every other script in game, this would still be super useful!!! Self contained scripts that change instances only they mess with are pretty common depending on what you are doing, and this would be a MASSIVE boost performance wise to this kind of tasks.

6 Likes

This would be awesome! Many times I have been unable to properly parallelise a script / algorithm because I can’t change the data model at all. The ability to take thread ownership of a part to prevent race conditions / multithreaded bugs would be an amazing change to allow for fully parallel luau!