Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Studs and Inlets Fail After Script Is Ran?

So here is a a script I made (yes, I finally managed to do something :D) that is supposed to make Plane be anchored when it is cloned, which it does, and then in 10 seconds, it is supposed to unanchor. I have the BaseParts that are welded together using studs and inlets. In-game, the plane falls apart mid-air. Why is this and how can I make it fall as one piece because I thought studs and inlets would keep it together.

for _,v in pairs (game.Workspace.Plane:GetChildren()) do
if v:IsA("Part") or v:IsA("BasePart") or v:IsA("UnionOperation") then
    v.Anchored = true
    end
end

wait(10)
for _,v in pairs (game.Workspace.Plane:GetChildren()) do
if v:IsA("Part") or v:IsA("BasePart") or v:IsA("UnionOperation") then
    v.Anchored = false
    end
end
wait(4)
for _,v in pairs (game.Workspace.Plane:GetChildren()) do
if v:IsA("Seat") then
    v:Destroy()
    end
end

1 answer

✓ Accepted answer

studs and inlets only lock in one direction.

--VISUAL DIAGRAM THAT IS HORRIBLE
- = stud
. = inlet



|---|
.....
|---|
.....


--Hey, these two bricks stick together!

|--||--|
|1||3|
........
|--||--|
|2||4|
........

Uh oh, Bricks 1,2 stick together, and 3,4 stick together, but thats it!

1,3 and 2,4 dont stick together! thats because studs and inlets here are only placed on top and bottom, so they only stick vertically.

to make this work, bricks 1 and 2 should have studs also on their right, and 3 and 4 should inlets also on their left.

Yeah, i know code blocks arent used like that, but it wouldn't look right without being in a code block

Now these bricks stick horizontaly and vertically.

Try looking into Welds and Glue too.

This discussion is preserved as it was. New answers, comments, and votes are closed.