Offsetting Child Part To Parent Part

I would like to keep an anchored child part offsetted from an anchored parent part while the parent part moves via CFrame, should I

  1. Parent the child parent to the parent part

  2. Use a weld between the 2

  3. Constantly update the child part’s offset CFrame on a loop as the parent part moves?

It’s probably best to CFrame both Parts at the same time since they are both anchored.

Maybe tell us what you’re doing with these 2 parts.
If they are always offset the same amount you could make them a Model and CFrame that.
Or is one rotating around the other one like a pet?

The child part is always a constant offset. I want to do something like setting bullet holes on a move part. What’s so bad about parenting it?

Nothing wrong with it. I just wanted some more information.

Now that you’ve told us that it’s for something like bullet holes it gives other people options on what to suggest as a Solution.

If you were Tweening the Anchored Part you could just make the bullet hole Parts Unanchored and weld them to the Anchored Part.

I’ve done this very thing before, what you have to do is un-anchor the part you want to be offset and weld it with the “main” part, the “main” part can be anchored and when you update the cframe on the “main” part the secondary part will move respectively and same with rotating it’ll always keep the same relation!

Hope this can help and ask if I wasn’t clear about something! :blush:

Sincerely,
oski3d1

I’d suggest putting WeldConstraints in a PrimaryPart and unanchoring all the other parts, only keeping the PrimaryPart anchored. Also, if its a Model remember to set the “PrimaryPart” property in the model’s Properties tab

Step by step:
1- Group all the parts in a model
2- Make a PrimaryPart and set it in the model’s property
3- paste in the following code:

You can paste that in your Command Bar, remember to replace the model’s location

local model = workspace.Model -- replace with model's location
local primaryPart = model.PrimaryPart

for i,v in pairs(model:GetChildren()) do
	if v ~= primaryPart then
		local weldConstraint = Instance.new("WeldConstraint", primaryPart)
		weldConstraint.Part0 = primaryPart
		weldConstraint.Part1 = v
	end
end

Here’s how it should look:
image image

now, if you move the PrimaryPart, all the other parts move with it