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: Fire script problem (help)

Previous Thread :: Next Thread 
Glocks is not online. Glocks
Joined: 12 Jun 2009
Total Posts: 647
07 Dec 2011 04:30 PM
This works but every time I touch the part it adds more fire too my torso. I need it to where if there is fire there already then dont add fire when I touch the brick.

I tried this on line 5
if hum and hit.Parent:findFirstChild('Fire') == nil then
but it doesn't work


bin = script.Parent

function touch(hit)
local hum = hit.Parent:findFirstChild('Humanoid')
if hum then
f = Instance.new('Fire')
f.Parent = hit.Parent:findFirstChild('Torso')
while hum.Health > 0 do
wait(2)
hum.Health = hum.Health - 5
end
end
end

bin.Touched:connect(touch)
Report Abuse
Penguine236 is not online. Penguine236
Joined: 13 Apr 2011
Total Posts: 1303
07 Dec 2011 04:33 PM
Im assuming bin is a part so after the human check add this line:

if hum.Parent.Fire==nil then
Report Abuse
Glocks is not online. Glocks
Joined: 12 Jun 2009
Total Posts: 647
07 Dec 2011 04:35 PM
would it be this? cause the fire is in the Torso
if hum.Parent.Torso.Fire == nil then
Report Abuse
Glocks is not online. Glocks
Joined: 12 Jun 2009
Total Posts: 647
07 Dec 2011 04:48 PM
its not working
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