So I've been trying to make a nuke that breaks the joints of whatever it touches
function destroy(brick) brick:BreakJoints() end for i = 1, 200 do script.Parent.Touched:connect(destroy) script.Parent.Size = script.Parent.Size + Vector3.new(1, 1, 1) script.Parent.CFrame = game.Workspace.NukeModel.Nuke.CFrame wait(.1) end
When I run it, it breaks the joints of my character, but does not break the joints of whatever bricks it touches. What's going on there?
EDIT: So, it seems that the function is not being called because I am CFraming the script's parent. Without CFraming it in this way, though, it would teleport above parts it came in contact with, never allowing another object to be inside of it... Work arounds to this?
You should anchor them then unanchor them in the script BreakJoints() Description:Breaks any surface connection with any adjacent part, including Welds and other JointInstances.