How to use parallel in the client?

On a falling-sand pixel game, I need to utilize parallel lua to render the frame and simulate the next frame within the same frame for efficiency, I’m not the best at parallel, I’ve looked at sources but I’m still confused.

This is my implementation (parent of the localscript is an actor)

game["Run Service"].PostSimulation:Connect(Render)
game['Run Service'].PreSimulation:ConnectParallel(Simulate)

Are you using task.desynchronize() to have the code run in Parallel?

plus, where exactly are you putting the LocalScript?

Yes

image

IIRC, LocalScripts can only run in parallel if they are linked to an actor parented to the Character.

Hopefully when RunContext gets released this will become a lot easier to manage.

since my game is a UI game, the character isn’t loaded in

What would I parent the actor to then?