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

How To Prevent BreakJoints From Killing Players?

Here is a script that I made to break the joints of connected parts because the parts are unanchored but they are connected by studs and inlets. However, when a player touches it, the player dies too. I assume that this also breaks some of the joints in the player that connect it to the torso and head and stuff. How would I prevent those essential player joints from breaking while letting the parts continue to break joints?

function onTouched(hit)

hit:BreakJoints()

end

1 answer

✓ Accepted answer
function onTouched(hit)

if hit.Name == " " then --Between the quotation marks, just name that one specific part.

hit:BreakJoints()

end

end

So basically, this checks for the part's name. If it's the right name, it would break the joints attached to that part.

1 comment

0

Thank you for this simple answer! I have just tried using it and it works! I don't die anymore! Yay! :D

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