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: If hit with explosion?

Previous Thread :: Next Thread 
Gladii is not online. Gladii
Joined: 10 Mar 2012
Total Posts: 1713
20 Dec 2014 01:00 PM
How do I identify if the parent has been hit when an explosion?
Report Abuse
Pragmatist is not online. Pragmatist
Joined: 17 Oct 2008
Total Posts: 16170
20 Dec 2014 01:03 PM
local Create = LoadLibrary("RbxUtility").Create

local function explode(pos)
local explosion = Create("Explosion")({
BlastRadius = 5,
BlastPressure = 0,
Position = pos
})

explosion.Hit:connect(function(hit)
print("hit")
end)
end

explode(workspace.Player1.Torso.Position)
Report Abuse
Gladii is not online. Gladii
Joined: 10 Mar 2012
Total Posts: 1713
20 Dec 2014 01:05 PM
Is that just for finding if hit with the explosion?
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Dec 2014 01:15 PM
Use .Hit event to find a part that it hit

explosion.Hit:connect(function(part)

print(part.Name.." was affected by an explosion!")

end)
Report Abuse
Gladii is not online. Gladii
Joined: 10 Mar 2012
Total Posts: 1713
20 Dec 2014 01:40 PM
Thank you.
Report Abuse
Gladii is not online. Gladii
Joined: 10 Mar 2012
Total Posts: 1713
20 Dec 2014 01:46 PM
I can't have 1 function within another.
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