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?

8 comments
In my opinion, it probably isn't safe to put your Connection line [line 6] inside the loop. Consider moving it Outside the loop? Also, the problem may be that the BasePart's may be Anchored.
Are these connected parts anchored? If so, try adding an un-anchor statement to your 'destroy' function.
No, those connected parts are not anchored :(
It may be that the Touched event is not firing. ROBLOX has "This event does not fire if the part is being CFramed through something." on 'Touched' in their wiki.
You may be right. How might I work around that?
You could use magnitude and automatically find parts/characters within range of your 'nuke'.
That only applies if he's CFraming the part, though. I'm going to assume he's not, therefore Touched should fire. I haven't run into a situation where it hasn't when it should, though.
Hm.. Actually, I AM CFraming the part, to the CFrame of the NukeModel. I did this because with out that bit of programming, the resizing nuke would grow bigger and bigger and every time it came in contact with another object, it would just teleport to above it so that no object was ever inside of it...