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 » Scripting Helpers
Home Search
 

Re: How do i make a brick that explodes on contact?

Previous Thread :: Next Thread 
AceBloxZero is not online. AceBloxZero
Joined: 09 Oct 2013
Total Posts: 769
05 Nov 2013 06:08 AM
Please tell me how :(
Report Abuse
xXPowerBladeXx is not online. xXPowerBladeXx
Joined: 12 May 2013
Total Posts: 27
05 Nov 2013 06:23 AM
function touch(hit)
plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
Instance.new("Explosion", script.Parent)
end
end

script.Parent.Touched:connect(touch)
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
05 Nov 2013 07:39 AM
He dun't say on contact with a player's character. He just said on contact.
Derefore

script.Parent.Touched:connect(function()
Instance.new('Explosion', workspace).Position = script.Parent.Position
end)
Report Abuse
noobgun007 is not online. noobgun007
Joined: 03 Nov 2013
Total Posts: 6
05 Nov 2013 07:43 AM
I don't think getting the player is going to make the brick explode on the humanoid. And put the script into the brick.

script.Parent.Touched:connect(function(hit)
hum = hit.Parent:findFirstChild("Humanoid")
if hum then
ex = Instance.new("Explosion")
ex.Position = script.Parent.Position
end
end)

and if you don't want it to explode when a humanoid touches this script will mke the brick explode if anything touches the brick

script.Parent.Touched:connect(function(hit)
ex = Instance.new("Explosion")
ex.Position = script.Parent.Position
end)
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
05 Nov 2013 07:48 AM
noobgun he specifically said on contact. He didn't mention which object can or cannot trigger the landmine. Derefore, your first script was unnecessary.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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