generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Getting a non-roblox explosion, explosion to be lethal.

Previous Thread :: Next Thread 
pawnz is not online. pawnz
Joined: 22 Feb 2010
Total Posts: 286
07 Jul 2015 03:12 PM
Ok so I got this script to work inside of my cannon setup.
-----------------------------------------

local Boom = Instance.new("Part")
Boom.Parent = game.Workspace
Boom.formFactor = 0
Boom.Shape = 0
Boom.CanCollide = false
Boom.BrickColor = BrickColor:White()
Boom.Position = position
Boom.Transparency = .8
Boom.Size = Vector3.new(5, 1, 5)
Boom.Anchored = true
Boom.TopSurface = "Smooth"
Boom.BottomSurface = "Smooth"
wait(0)
Boom:Remove()

-----------------------------------------
And I want Boom to get this script (below) inside of its generated part when it spawns into the work space from being shot out of the cannon, To make the script below a child of the script made brick above possible? if so hao? ;-;
------------------------------------------

function onTouched(part)
if part.Parent:FindFirstChild("Humanoid") ~= nil then
part.Parent.Torso:BreakJoints()
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
MakerModelLua is not online. MakerModelLua
Joined: 24 Feb 2013
Total Posts: 3544
07 Jul 2015 03:13 PM
You're removing the part though. Use an explosion perhaps?
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
07 Jul 2015 03:17 PM
local Boom = Instance.new("Part")
local Bang = script.Bang:Clone()
Bang.Parent = Boom
Boom.Parent = game.Workspace
Boom.formFactor = 0
Boom.Shape = 0
Boom.CanCollide = false
Boom.BrickColor = BrickColor:White()
Boom.Position = position
Boom.Transparency = .8
Boom.Size = Vector3.new(5, 1, 5)
Boom.Anchored = true
Boom.TopSurface = "Smooth"
Boom.BottomSurface = "Smooth"
wait(0)
Boom:Remove()

Use that instead, but put the script below (the one that kills) as a child of this script, and name it "Bang".
Report Abuse
pawnz is not online. pawnz
Joined: 22 Feb 2010
Total Posts: 286
07 Jul 2015 03:17 PM
I cannot mix explosions as the cause of death for this scenario.

My situation before was.

The cannon ray cast has just enough (roblox)explosion power to kill a player but not destroy parts on other tanks "Because I am using an heath system for tank damage/HP"

However after a few days of testing I found that some of my light tank designs can be torn apart and cause lag when the 40 tiny unions on their front mantles fall onto the baseplate as LAG inducing debris.

So I decided to have a part be able to kill players instead, More efficient, less messy.
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
07 Jul 2015 03:18 PM
and hopefully that'll fire the touched event with the little time it's been given
Report Abuse
pawnz is not online. pawnz
Joined: 22 Feb 2010
Total Posts: 286
07 Jul 2015 03:31 PM
Only reason it gets 0 time to do the script is because wouldn't that lock up the rest of the script?

This is just a excerpt for the guns properties that is in my tanks main script.
Report Abuse
pawnz is not online. pawnz
Joined: 22 Feb 2010
Total Posts: 286
07 Jul 2015 03:32 PM
And also how do I make the script become a child of the part?
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
07 Jul 2015 03:34 PM
Well in the explorer you may see something like:
workspace
>Part
>>Script
the part is underneath workspace, which means it's a child of workspace
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image