Syncing part movement with character movement?

I’m trying to set a custom rig’s position for every player in the game from a local script, but it’s not synced which makes it look bad
https://i.gyazo.com/be225c0fc68a518157c44a5544f100f3.mp4
Here is the current script:

game:GetService("RunService").Stepped:Connect(function(DL)
	for _,Player in pairs(game.Players:GetChildren()) do
		
		if Player ~= LocalPlayer then
			local Character = Player.Character
			spawn(function()
				pcall(function()
					-- Set CFrame, No delay
				end)
			end)
		end
		
		
	end
end)

I still need an answer to this.

Hmm…

You shouldn’t wrap your code in spawn and pcall, not sure why you would need to in this situation. spawn() creates a delay, which will lead to sync issues for fine tuned stuff like this.

1 Like

Thanks, I have solved my problem and got a new tip for future :smiley: