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: Firing Range Help....

Previous Thread :: Next Thread 
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
12 Aug 2012 07:43 AM
Hi, I'm making a firing range, and I need to make it so smoke would enable on a target when it's shot. To do so, I think I would need to make it enable when the bullet hits the target. How would I do this? Is their a function for a part hitting another part?
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
12 Aug 2012 07:45 AM
function OhGodImBleedingOut()
--Enable Smoke here
end
script.Parent.WhatEver.Touched:connect(OhGodImBleedingOut)
Report Abuse
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
12 Aug 2012 07:46 AM
Thank you so much.
Report Abuse
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
12 Aug 2012 08:10 AM
Is their a way to make it so the smoke will enable whenever any brick touches it?
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
12 Aug 2012 08:33 AM
that's what that script does.
Report Abuse
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
12 Aug 2012 08:37 AM
Doesn't that script just make it so once the brick called "WhatEver" touches the brick called "OhGodImBleedingOut" the smoke comes out of OhGodImBleedingOut?



function OhGodImBleedingOut()
--Enable Smoke here
end
script.Parent.WhatEver.Touched:connect(OhGodImBleedingOut)
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
12 Aug 2012 09:14 AM
No. When it is touched by the player, the function will be called.
Report Abuse
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
13 Aug 2012 07:25 AM
So is their any way I can make it release smoke when it's hit by a bullet?
Report Abuse
MrChickens is not online. MrChickens
Joined: 21 Feb 2009
Total Posts: 1076
13 Aug 2012 07:28 AM
function TargetHit(Hit)
if Hit.Name == "Bullet" then
--Enable Smoke
end
end

script.Parent.Touched:connect(TargetHit)

Replace Bullet with the Bullet's name.
Report Abuse
MrChickens is not online. MrChickens
Joined: 21 Feb 2009
Total Posts: 1076
13 Aug 2012 07:29 AM
Place the script directly in the block you want to be the "Target".
Report Abuse
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
13 Aug 2012 07:48 AM
Thanks, I'll try that.
Report Abuse
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
13 Aug 2012 07:56 AM
Thank you so much, it works perfectly...
Report Abuse
MrChickens is not online. MrChickens
Joined: 21 Feb 2009
Total Posts: 1076
13 Aug 2012 08:01 AM
No problem :)
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
13 Aug 2012 08:55 AM
Anymore help?
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