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 Extinguisher

Previous Thread :: Next Thread 
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
04 Oct 2012 07:20 PM
So this is the script:

local bubble = script.Parent

bubble.Touched:connect(function(part)
parts = part:GetChildren()
if part.Fire then -- line 5
part.Fire.Enabled = false
part.Smoke.Enabled = false
part.ls.Disabled = true
wait(3)
part.Fire.Enabled = true
part.Smoke.Enabled = true
part.ls.Disabled = false
else
wait(0.1)
end
bubble:remove()
end)


It works, however, after the wait(3) it doesn't work. So it disables the fire and all that. The fire should start up again after the wait in which it doens't. I'm also getting this error a lot:

Fire is not a valid member of Part
17:18:41 - Script "Workspace.Part.ExtinguishScript", Line 5
17:18:41 - stack end
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
04 Oct 2012 08:22 PM
BUMP DA BUMP
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
04 Oct 2012 08:49 PM
BUMP!!!!!!!!!!!!
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
04 Oct 2012 09:08 PM
Never defined part
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
04 Oct 2012 09:08 PM
nvm lololzz
Report Abuse
HaxHelper is online. HaxHelper
Joined: 19 Dec 2009
Total Posts: 1208
04 Oct 2012 09:11 PM
It seems like your problem is being cause by indexing the objects directly instead of using :findFirstChild().

I would change "part.Fire" and "part.Smoke" to "part:findFirstChild("Fire")" and "part;findFirstChild("Smoke")"

Also, you may want to change ":remove()" to ":destroy()"
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
06 Oct 2012 03:21 PM
local bubble = script.Parent

bubble.Touched:connect(function(part)
parts = part:GetChildren()
if part.Name == "Fire" then
a = part:findFirstChild("Fire")
b = part:findFirstChild("Smoke")
c = part:findFirstChild("ls")
a.Enabled = false
b.Enabled = false
c.Disabled = true
wait(3)
a.Enabled = true
b.Enabled = true
c.Disabled = false
else
wait(0.1)
end
bubble:remove()
end)



Still doesn't work fully. What the script is suppose to do is take out the fire.. which it does. However, after three seconds it won't enable the fire again.
Report Abuse
shaythegoon is not online. shaythegoon
Joined: 18 Jul 2010
Total Posts: 630
06 Oct 2012 03:24 PM
is the bubble touching the fire when the fire starts again, because you have else, under the if that only starts when the bubble is touching...
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
06 Oct 2012 03:58 PM
I don't understand what you just said. If so how would I fix it?
Report Abuse
shaythegoon is not online. shaythegoon
Joined: 18 Jul 2010
Total Posts: 630
06 Oct 2012 04:05 PM
you need a seperate function for allowing the fire to come back on basically
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
06 Oct 2012 04:06 PM
I'm confused. Post what you mean please.
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
06 Oct 2012 04:07 PM
local bubble = script.Parent

bubble.Touched:connect(function(part)
parts = part:GetChildren()
if part.Name == "Fire" then
a = part:findFirstChild("Fire")
b = part:findFirstChild("Smoke")
c = part:findFirstChild("ls")
a.Enabled = false
b.Enabled = false
c.Disabled = true
print("1")
wait(3)
print("2")
a.Enabled = true
b.Enabled = true
c.Disabled = false
print("3")
else
wait(0.1)
end
bubble:remove()
end)


It only prints 1. If that helps.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
06 Oct 2012 04:08 PM
I coded this awhile ago, sadly it only works at my script builder (which can be found on my profile) because it uses InsertService: cannot post it here, so go to pastebin.com/H43LUU5x
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
06 Oct 2012 04:09 PM
Well no lol. I need it to work at MY place.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
06 Oct 2012 04:10 PM
Okay, so look at how I made the foam work and try to implement it.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
06 Oct 2012 04:11 PM
Although it isn't my most efficient piece of coding, because it was made awhile ago and I only made it for simple use so didn't really care much about it.
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
06 Oct 2012 04:16 PM
Yeah I'm not understanding too much of your code. :P
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
07 Oct 2012 03:27 PM
BUMP D:
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
07 Oct 2012 03:38 PM
local bubble = script.Parent
bubble.Touched:connect(function(part)
parts = part:GetChildren()
if part:findFirstChild("Fire") then -- line 5
part.Fire.Enabled = false
part.Smoke.Enabled = false
part.ls.Disabled = true
wait(3)
part.Fire.Enabled = true
part.Smoke.Enabled = true
part.ls.Disabled = false
else
wait(0.1)
end
bubble:remove()
end)
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