Property BasePart.CFrame is not safe to write in parallel

I don’t understand… I’m trying to use parallel lua to do something but it’s giving me
Property BasePart.CFrame is not safe to write in parallel. I think parallel lua thing is used for doing stuff super fast right? If so that’s what I need but it ain’t working.

game:GetService("RunService").Heartbeat:ConnectParallel(function(dt)
	task.synchronize()
	check()
	task.desynchronize()
	check()
end)

Parallelism is meant for doing calculations at the same time as other calculations. Generally, to make changes to the primary thread (i.e. the game) the threads need to be synchronized. So you can do a bunch of math unsynchronized, then synchronize and change a CFrame. I’d generally recommend against parallelism unless you’re familiar with it or have a good reason. Making things happen faster is generally the wrong wording. It’s for allowing multiple calculations to happen simultaneously, not for a single thing to happen faster.

3 Likes