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
 

Re: Exploding Part on Touch?

Previous Thread :: Next Thread 
ReptiliaSerpentes is online. ReptiliaSerpentes
Joined: 11 Dec 2014
Total Posts: 333
13 Nov 2016 09:40 AM
local ExplodingBall = script.Parent
local function steppedOn(part)
local parent = part.Parent
if game.Players:GetPlayerFromCharacter(parent)then
Instance.new(Explosion)
end
end

It does not work. :C


I Will Be The Next Donald Trump
Report Abuse
SheikhGoat is not online. SheikhGoat
Joined: 17 Mar 2011
Total Posts: 1992
13 Nov 2016 09:43 AM
That's not how to create an explosion this is how:

local expl = Instance.new("Explosion")
expl.Position = part.Position
expl.BlastRadius = RadiusOfExplosion
expl.BlastPressure = TheStrenghtOfExplposion
expl.Parent = workspace
Report Abuse
RainingUpwards is not online. RainingUpwards
Joined: 10 Apr 2012
Total Posts: 434
13 Nov 2016 09:44 AM
You've got the event that triggers the function right? x'D

if game.Players:GetPlayerFromCharacter(part.Parent) then
Instance.new("Explosion")
end

Pretty sure that's not how you initiate an explosion but I can't be bothered to look it up.


228,680 slices of pizza and counting
Report Abuse
jordan0810 is not online. jordan0810
Joined: 03 Jun 2012
Total Posts: 846
13 Nov 2016 10:52 AM
local function script.Parent.Touched:connect(function()
local expl = Instance.new("Explosion",script.Parent)
expl.Position = part.Position
expl.BlastRadius = 10
expl.BlastPressure = 10
end)
Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
13 Nov 2016 10:58 AM
script.Parent.Touched:connect(function(part)
local player = game.Players:GetPlayerFromCharacter(part.Parent)
if player then
Instance.new('Explosion',script.Parent)
end
end
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