|
| 05 Nov 2011 03:14 PM |
There isn't an error on the output and I had this script in a model:
for i, v in pairs(script.Parent:GetChildren()) do if v:IsA("Part") then v.Touched:connect(function(hit) hit:BreakJoints() end) end end
Any idea how it doesn't work? |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 03:18 PM |
for i,v in pairs(script.Parent:GetChildren()) do if v:IsA("Part") then v.Touched:connect(function(hit) hit.Parent:BreakJoints() end) end end
|
|
|
| Report Abuse |
|
|
Ganondude
|
  |
| Joined: 22 Jun 2007 |
| Total Posts: 1175 |
|
|
| 05 Nov 2011 03:20 PM |
| Are you sure there are objects of type "Part" in script.Parent? Remember that using just "Part" in IsA() doesn't include WedgeParts, CornerWedgeParts or TrussParts. If you want to include all types of parts use "BasePart". |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 03:20 PM |
| Nothing changed. What I'm basically trying to do is test these racers that go across this big path and end up falling into somethingand dying! |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 03:23 PM |
| Figured it out, it's the ROBLOX Studio test (not in solo mode, I just pressed the play button) mode that's buggy with the script... |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 03:24 PM |
| ... and when I do play solo, the script WORKS. |
|
|
| Report Abuse |
|
|