I am rather curious what BreakJoints() does to the parts involved other than the obvious. Does it change a property, set something to false? Change the sides to "Smooth" surfaces?
Is there more to "BreakJoints()" than what you see? If so, can you please explain?
Thanks :)
All Snaps and Weld and Glue and Hinges &c are parts inside the JointsService.
The JointsService is just the place where all snaps are supposed to go.
When you call BreakJoints
on a part or model, the game deletes all of the snaps involving those parts (most of which are in the invisible JointsService, but act just like other Weld
s or whatever that you've created)
The surfaces of parts themselves don't actually mean much: they only decide how MakeJoints()
picks which types of snaps and which parts to snap together.
EDIT:
To find joints on a part is a little difficult. While the canonical place to put JointInstances is the JointsService, lots of scripts that add joints put them elsewhere.
To accommodate that, you would have to recursively scan the Workspace as well. To just find the joints that are made by MakeJoints()
(from ROBLOX handling touching surfaces that snap) we just search through the JointsService:
function findJoints(part) local j = {}; for _, joint in pairs(game.JointsService:GetChildren()) do if joint:IsA("JointInstance") then if joint.Part0 == part or joint.Part1 == part then table.insert(j, joint); end end end return j; end
BreakJoints tells the physics engine to break all the invisible welds in a model, thats about it
Other than breaking joints this can also to kill a players character. This is done automatically when the players health is 0. This is why your character breaks apart wen you die
"instance of player".Character:BreakJoints()