local W=(Instance.new("\080\097\114\116")).GetConnectedParts local o=script.GetChildren function GetPartJoints(o,O)local l={}for W,o in pairs(SearchJoints(o,o,O))do l[W]=o end for W,b in pairs(W(o))do for W,o in pairs(SearchJoints(b,o,O))do l[W]=o end end return l end

local GetConnectedParts = Instance.new('Part').GetConnectedParts;
local GetChildren = script.GetChildren;

function GetPartJoints(Part, Whitelist)
	-- Returns any manual joints involving `Part`

	local Joints = {};

	-- Get joints stored inside `Part`
	for Joint, JointParent in pairs(SearchJoints(Part, Part, Whitelist)) do
		Joints[Joint] = JointParent;
	end;

	-- Get joints stored inside connected parts
	for _, ConnectedPart in pairs(GetConnectedParts(Part)) do
		for Joint, JointParent in pairs(SearchJoints(ConnectedPart, Part, Whitelist)) do
			Joints[Joint] = JointParent;
		end;
	end;

	-- Return all found joints
	return Joints;

end;
