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

How to locate joint instances?

I've been trying to use an object to breakjoints on any object containing them, not just players. What do I have to specifically search for, and how?

the code so far will only work for objects containing a humanoid:

script.Parent.Touched:connect(function(hit)

	if script.Parent.Transparency == 1 then return end
	
	
	
	if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent:BreakJoints()
	
end

end )

1 answer

Well yes, of course...

script.Parent.Touched:connect(function(hit)
	if script.Parent.Transparency == 1 then return end
	if hit.Parent:FindFirstChild("Humanoid") then --this checks if what touched has a humanoid, and only breaks joints if that is true, so just change this so that it searches for a joint
		hit.Parent:BreakJoints()
	end
end

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