Why does this anchor glitch happen?

I need these to be unanchored so I can tween the door.

When I unanchor them, they appear at the middle.

I don’t know why this happens, and after I do it, if I reanchor them, they don’t appear at their original spots, AND if I do Ctrl Z, they unanchor, but don’t move back to their original spots.

I have no clue why this happens, and this also happens in game when I use a script to unanchor both.

They both have a weld to the base (the white door).

Ignore the door on the right of it.

2 Likes

Alright, so first of all. I think this should be moved to Scripting Support, even though it’s related to Building you’re going to tween it, which means you want it posted on the scripting section.

In order for you to Tween a model, you must create a WeldConstraint to each part of this model, make the Part0 the Part you’re welding itself and Part1 a Core part which you will choose for your model.

You can run this code in your command bar on studio.

local model = --put model path in here
local core = model. -- put core path in here

for i,v in pairs(model:GetDescendants()) do
 if v:IsA("BasePart") and v ~= core then

local weld = Instance.new("WeldConstraint", v)
weld.Part1 = v
weld.Part0 = core
 end
end

Once that’s out of the way, make sure all of the parts, except for the Core are unanchored, this is the only way you can tween them.

With all of that setup, make sure you only tween the Core part, as the other parts will follow due to the WeldConstraint.

If you face any issues, make sure to comment on my solution, otherwise mark it as the solution.

2 Likes

So, I have 2 ideas for why this might happen.

•If you haven’t applied the welds correctly, unanchoring them might cause the welded parts to move into each other during runtime.

•Check workspace or the door model for any humanoids, these insert values like OriginalSize that can mess up the game by making the size of the parts inside them reset, even in studio. (Don’t think it’s likely to be this though)

Unanchoring welded anchored parts will immediately snap them to wherever they were originally welded, relative to the part they were welded to.

Unfortunately, the parts don’t follow. They are anchored, and I created the WeldConstraints you asked for.

The handle and window are also unanchored. And yes, even though they’re unanchored, they’re literally floating when the door is tweened.

The core is Base, and the only child Base has is a disabled script (that isn’t the script I’m using to tween).

image

Reminder that, every single part must be unanchored except for the Core.

Do you have “Join Surfaces” turned on? This is a setting which automatically welds stuff. It might be creating welds on the door if it’s on. If it is on, turn it off and move the door slightly to break any welds which could have been created.

Oh, yeah, just to silence this topic, a few months ago I found out WeldConstraints were working without snapping parts to positions. The door works perfectly now.