|
| 24 Jul 2013 09:55 AM |
What do I put in this script so it explodes when it touches something.
local Part = script.Parent Part.Touched:connect(function(Hit) Hit. end |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 09:58 AM |
Part = script.Parent t = false Part.Touched:connect(function(Hit) if t == false then t = true local ex = Instance.new("Explosion",Workspace) ex.Position = Part.Position t = false end end |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 24 Jul 2013 09:58 AM |
Instance.new("Explosion", Workspace).Position = Hit.Position
Fix: "end)" |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 09:58 AM |
Oops, one more thing:
Part = script.Parent t = false Part.Touched:connect(function(Hit) if t == false then t = true local ex = Instance.new("Explosion",Workspace) ex.Position = Part.Position t = false end end) |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 09:59 AM |
| How would I insert that script into a part that is inserted from a script? |
|
|
| Report Abuse |
|
|
100465
|
  |
| Joined: 17 Jun 2010 |
| Total Posts: 6353 |
|
|
| 24 Jul 2013 10:00 AM |
function onTouched(part) local hum = part.Parent:findFirstChild(Humanoid) if hum ~= nil then Instance.new("Explosion", game.Workspace.part.Parent) end
Thats for humanoids only.
Im not random, my mind just works faster than yours. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 24 Jul 2013 10:00 AM |
| uBEmissingANendANDaCONNECTOR |
|
|
| Report Abuse |
|
|
100465
|
  |
| Joined: 17 Jun 2010 |
| Total Posts: 6353 |
|
|
| 24 Jul 2013 10:03 AM |
Whoops forgot the last lines.
Im not random, my mind just works faster than yours. |
|
|
| Report Abuse |
|
|