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
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.