Absolute Positioning from one Part to another using CFrames

If I move A, B moves but the progression is slow.
Example: https://streamable.com/viy9q

A = Black Part
B = White Part

I’ve tried using Stepped, Heartbeat and the outcome is the same. For some reason, B follows the other part way too slow. How do I make it so that it’s near absolute? This seems incredibly simple but, I feel like I’m missing something.

-- ServerScript in model
local RunService = game:GetService("RunService")
local model = script.Parent
local A,B = model.A,model.B

RunService.Heartbeat:Connect(function(step)    
    B.CFrame = A.CFrame
end)

Much appreciated.

1 Like

RenderStepped lets you move parts right before the camera renders the current frame, try using that event instead.
Also, it helps to anchor the part too, but it shouldn’t matter if you use RenderStepped since it’s after the physics engine is done.

1 Like

RenderStepped only works in a local script. Using a ServerScript.

Well, the server wouldn’t be rendering the parts, only the clients, so maybe you could try moving the parts on the client instead. This would work especially well if the parts are anchored since non-physics CFrame changes aren’t replicated.

This is a really dumbed down version of a system that I use for procedural animation. I converted it into a local script and found that the “gap” is far worse when using RenderStepped over Heartbeat but still produces unwanted results.

2 Likes

Is it not possible to use a simple Weld and then manipulate C0 and C1 to offset your parts?

1 Like

Just tested this in studio. The parts do not lag behind each other at all.

a:GetPropertyChangedSignal("CFrame"):Connect(function()
	b.CFrame = a.CFrame
end)

3 Likes