actor
Updatedsrc/server/physics.server.actor.aly
local hits = {} parallel do table.insert(hits, 1) end
.actor. after the side puts a script in an Actor. physics.server.actor.aly builds as the Actor physics with the Script physics in it, and .client.actor.aly makes one with a LocalScript. The script keeps the class that its side gives it.
The build writes the script as physics/physics.server.luau, beside an init.meta.json that gives the folder the class Actor. Rojo reads that file, so the project file and the source cannot disagree. The sourcemap holds the Actor too, so script.Parent is the Actor in the editor. A relative import climbs one more folder in the emit, because the script sits one folder deeper.
One file makes one Actor. A pool of workers is a number that changes with the device and the load, so clone the Actor that the build writes:
local template = script.Parent:FindFirstChild("worker") :: Actor for i = 1, workers do local worker = template:Clone() worker.Parent = folder end
Only a script takes the infix. A module under an Actor runs nothing on its own, so .actor. on a module is an error that names the script to put it on. An init script takes the name of its folder, so it takes no infix either. x.actor.server.aly puts the infix before the side, and the report gives the order.
Step.on and Step.once of a message bind on the Actor of the script, so they need the infix. A parallel block runs in any script under an Actor.
