View previous topic :: View next topic |
Author |
Message |
ganswish Beginner Poster
Joined: 06 Feb 2008 Posts: 37
|
Posted: Wed Feb 06, 2008 2:43 am Post subject: Explosion Brick! |
|
|
I have a script that needs to be built :\ Please try to build it..
Name: ExplosionButton1
Description: A brick that causes a brick named ExplosionTarget1 To explode with a blast radius of 10
Needed Objects: ExplosionButton1 - game.Workspace.ExplosionButton1, ExplosionTarget1 - game.Workspace.ExplosionTarget1
Place Description: I need this so that I can causee a building to collapse with a detenation charge |
|
Back to top |
|
|
Walyn Teapot Drone Moderator
Joined: 06 Feb 2008 Posts: 40
|
Posted: Wed Feb 06, 2008 2:56 am Post subject: |
|
|
print("LandMine Script Loaded")
LandMine = script.Parent
function onTouched(hit)
explosion = Instance.new("Explosion")
explosion.BlastRadius = 6
explosion.BlastPressure = 1000000
explosion.Position = script.Parent.Parent.ExplosionTarget1.Position
explosion.Parent = game.Workspace
script.Parent:remove()
connection:disconnect()
script.Parent.Parent.ExplosionTarget1:remove()
end
connection = LandMine.Touched:connect(onTouched)
=====
You will need to get the Explosion sound from a rocket launcher and put it and this script in the ExplosionButton1 brick. This makes both bricks go away when the explosion is triggered. |
|
Back to top |
|
|
ganswish Beginner Poster
Joined: 06 Feb 2008 Posts: 37
|
Posted: Wed Feb 06, 2008 5:21 pm Post subject: |
|
|
Walyn, it didnt work :\ ! |
|
Back to top |
|
|
Tottireed Newbie
Joined: 06 Feb 2008 Posts: 8
|
Posted: Wed Feb 06, 2008 9:05 pm Post subject: |
|
|
Did you get that script I sent you alright? _________________ Totti |
|
Back to top |
|
|
Tottireed Newbie
Joined: 06 Feb 2008 Posts: 8
|
Posted: Wed Feb 06, 2008 9:14 pm Post subject: |
|
|
Well, here I will post it if you didn't!
-----
local debounce = false
function onTouched(hit)
local humanoid = hit.Parent:findFirstChild("Humanoid")
if humanoid~=nil and debounce == false then
debounce = true
local ex = Instance.new("Explosion")
ex.Position = game.Workspace.TNT.Position
ex.BlastRadius = 10
ex.Parent = game.Workspace
debounce = false
end
end
script.Parent.Touched:connect(onTouched)
----- _________________ Totti |
|
Back to top |
|
|
ganswish Beginner Poster
Joined: 06 Feb 2008 Posts: 37
|
Posted: Wed Feb 06, 2008 10:18 pm Post subject: |
|
|
Thank you VERY much Totti |
|
Back to top |
|
|
Tottireed Newbie
Joined: 06 Feb 2008 Posts: 8
|
Posted: Thu Feb 07, 2008 1:03 pm Post subject: |
|
|
Mhmm, no problem _________________ Totti |
|
Back to top |
|
|
|