GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 04 Jul 2012 11:35 PM |
How do I? I though I could make my own by making this script but it failed...
--Made by GuestHaxx
function onTouched(hit) local explosion = Instance.new('Explosion', Workspace) explosion.Position = Vector3.new(0, 50, 0) explosion.BlastRadius = 500
Basically here what I want to know:
How to create a OnTouch Explosion How to make the explosion spawn 5(what is this called??? bumps?) under where my object hit. How to add fire and smoke for detail...
Please do note, I've JUST begun learning how to script. (Like last night at 3am...couldn't sleep @.@) |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2012 11:39 PM |
That was all very good but you need to connect the function to an event, like this:
game.Workspace.Part.Touched:connect (onTouched) |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 04 Jul 2012 11:43 PM |
Like this?
--Made by GuestHaxx
function onTouched(hit) local explosion = Instance.new('Explosion', Workspace) explosion.Position = Vector3.new(0, 50, 0) explosion.BlastRadius = 500 game.Workspace.Part.Touched:connect (onTouched)
Or this
--Made by GuestHaxx
function onTouched(hit) game.Workspace.Part.Touched:connect (onTouched) local explosion = Instance.new('Explosion', Workspace) explosion.Position = Vector3.new(0, 50, 0) explosion.BlastRadius = 500
|
|
|
| Report Abuse |
|
|
|
| 04 Jul 2012 11:43 PM |
function onTouched(hit) local explosion = Instance.new('Explosion', Workspace) explosion.Position = Vector3.new(0, 50, 0) explosion.BlastRadius = 500 end game.Workspace.Part.Touched:connect (onTouched)
|
|
|
| Report Abuse |
|
|
|
| 04 Jul 2012 11:45 PM |
If none of those worked, try this, or something similar to it
function onTouched(hit) local explosion = Instance.new("Explosion") explosion.Position = Vector3.new(0, 50, 0) explosion.BlastRadius = 500 explosion.BlastPressure = 9e9 explosion.Parent = Workspace game.Workspace.Part.Touched:connect (onTouched) |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2012 11:46 PM |
function onTouched(hit) local explosion = Instance.new("Explosion") explosion.Position = Vector3.new(0, 50, 0) explosion.BlastRadius = 500 explosion.BlastPressure = 9e9 explosion.Parent = Workspace end game.Workspace.Part.Touched:connect (onTouched)
Try either that, or the other guy's script. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 04 Jul 2012 11:49 PM |
No nothing worked.
:/
Is it cause I have a mesh in the brick? Or am I missing something?
Script:
--Made by GuestHaxx
function onTouched(hit) local explosion = Instance.new("Explosion") explosion.Position = Vector3.new(0, 50, 0) explosion.BlastRadius = 500 explosion.BlastPressure = 9e9 explosion.Parent = Workspace game.Workspace.Part.Touched:connect (onTouched)
|
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 05 Jul 2012 12:18 AM |
You never ended the function. Add an end before the connection line and it should work |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 05 Jul 2012 01:55 AM |
--Made by GuestHaxx
function onTouched(hit) local explosion = Instance.new("Explosion") explosion.Position = Vector3.new(0, 50, 0) explosion.BlastRadius = 500 explosion.BlastPressure = 9e9 explosion.Parent = Workspace end game.Workspace.Part.Touched:connect (onTouched)
Still doesn't work.
:? What am I missing???? :? wait... do I need to add a Touch Interest? |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2012 01:58 AM |
| For the blastPressure what is 9e9? |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
| |
|
|
| 05 Jul 2012 02:03 AM |
I don't know if it would make a difference but:
explosion.BlastPressure = math.huge
I don't know |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 05 Jul 2012 02:12 AM |
| Try declaring the parent of the explosion before setting all its other properties. |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2012 02:21 AM |
If the duck smells like a duck, looks like a duck, and tastes like a duck, it's a duck. But if I say it's a unicorn, it's a unicorn.
~~Earl Puts the Arse in Assassin~~
|
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
| |
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 05 Jul 2012 02:32 AM |
Okay time to remake it....
Lets Start over from the roblox wiki....
And same result.
Here is my model I'm trying to make explode... (Well brick)
http://www.roblox.com/Explosion-Help-Please-item?id=85691577
All there is is a Brick, script and a mesh...
Tell me what I'm missing please... |
|
|
| Report Abuse |
|
|
Zebabwe2
|
  |
| Joined: 18 Jun 2011 |
| Total Posts: 110 |
|
|
| 05 Jul 2012 03:13 AM |
Hmm this script is suppose to be a simple one... but why doesn't it work? I'll try to help you out. |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2012 03:14 AM |
You try blogging with no arms.
~~Earl Puts the Arse in Assassin~~ |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 05 Jul 2012 03:15 AM |
| Please do....I'm losing sleep over this.. 3:14am my time...@.@ at least I'm using this time to learn things...And I know this is late but... HAPPY 4TH OF JULY!!!! Oh wait its the fifth... |
|
|
| Report Abuse |
|
|
Zebabwe2
|
  |
| Joined: 18 Jun 2011 |
| Total Posts: 110 |
|
|
| 05 Jul 2012 03:17 AM |
| Are you trying to say that you have to touch a "Part" to make it explode or touch the Tank Bullet to make it explode? |
|
|
| Report Abuse |
|
|
Zebabwe2
|
  |
| Joined: 18 Jun 2011 |
| Total Posts: 110 |
|
|
| 05 Jul 2012 03:20 AM |
UMAYGOD I teseted it at my game and exploded my terrain >_< Well to the looks of your script you need to touch a "Part" to make the bullet explode so here it is. (MAKE SURE YOU HAVE AN OBJECT NAMED "Part") You script worked perfectly but it just needed an "end" and a "Part" in your game.
--Made by GuestHaxx
function onTouched(hit) local explosion = Instance.new("Explosion") explosion.Position = Vector3.new(0, 50, 0) explosion.BlastRadius = 500 explosion.BlastPressure = 9e9 explosion.Parent = Workspace end game.Workspace.Part.Touched:connect (onTouched) |
|
|
| Report Abuse |
|
|
Zebabwe2
|
  |
| Joined: 18 Jun 2011 |
| Total Posts: 110 |
|
| |
|
|
| 05 Jul 2012 03:23 AM |
| Get up off the pavement. Wipe the dirt and vommit off. |
|
|
| Report Abuse |
|
|
Zebabwe2
|
  |
| Joined: 18 Jun 2011 |
| Total Posts: 110 |
|
| |
|
| |
|