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: Stove

Previous Thread :: Next Thread 
Jojomen56 is not online. Jojomen56
Joined: 20 Mar 2008
Total Posts: 463
25 Jan 2009 11:43 AM
This is a script I made so that it could be like real life cooking:

function onTouch(part)
if hit.Name == "Patty" then return end
wait(10)
script.Parent.BrickColor.BrickColor.new = 192
wait(10)
script.Parent.BrickColor.BrickColor.new = 26
end
end

When we put a brick named "Patty" on the brick with this script within, we wait 10 seconds and it will turn into another color. If we wait a total of 20 seconds, it'll turn into another color. I don't know whats wrong! The OutPut says there's suppose to be a 'eof' near somewhere... could somebody help me out?

PS: I'll be checking the Tread often.
PSS: Tell me if you need to description on what it's suppose to do or something.

Thanks all,

-Jojomen56
Report Abuse
Feezly is not online. Feezly
Joined: 26 Aug 2008
Total Posts: 1602
25 Jan 2009 11:45 AM
function onTouch(part)
if hit.Name ~= "Patty" then return end
wait(10)
script.Parent.BrickColor.BrickColor.new(192)
wait(10)
script.Parent.BrickColor.BrickColor.new(26)
end

script.Parent.Touched:connect(onTouch)
Report Abuse
Meelo is not online. Meelo
Joined: 04 Jul 2008
Total Posts: 14763
25 Jan 2009 11:47 AM
function onTouch(part)
if hit.Name ~= "Patty" then return end
wait(10)
script.Parent.BrickColor =BrickColor.new(192)
wait(10)
script.Parent.BrickColor = BrickColor.new(26)
end

script.Parent.Touched:connect(onTouch)
Report Abuse
Jojomen56 is not online. Jojomen56
Joined: 20 Mar 2008
Total Posts: 463
25 Jan 2009 01:40 PM
Thanks guys! I'll go check it out! =D
Report Abuse
Jojomen56 is not online. Jojomen56
Joined: 20 Mar 2008
Total Posts: 463
25 Jan 2009 01:51 PM
Ah man... sorry dudes... it's still not working... why isn't it working?! There still a problem somewhere... or, it's just not possible...
Report Abuse
FlameFace is not online. FlameFace
Joined: 20 Sep 2007
Total Posts: 1406
25 Jan 2009 01:53 PM
It isn't working because people normally don't put 'part' as the argument name, and it got overlooked:

function onTouch(hit)
if hit.Name ~= "Patty" then return end
wait(10)
script.Parent.BrickColor =BrickColor.new(192)
wait(10)
script.Parent.BrickColor = BrickColor.new(26)
end

script.Parent.Touched:connect(onTouch)
Report Abuse
LegoConqueror is not online. LegoConqueror
Joined: 07 Jan 2009
Total Posts: 1289
25 Jan 2009 01:55 PM
The ones above shuld work but here:

script.Parent.Touched:connect(function(p)
if p.Name == "Paty" then
script.Parent.BrickColor = BrickColor.new("192")
wait(10)
script.Parent.BrickColor = BrickColor.new("26")
end
end)
Report Abuse
LegoConqueror is not online. LegoConqueror
Joined: 07 Jan 2009
Total Posts: 1289
25 Jan 2009 01:56 PM
forgot a wait(10) but you can add that.
Report Abuse
Jojomen56 is not online. Jojomen56
Joined: 20 Mar 2008
Total Posts: 463
25 Jan 2009 02:42 PM
Ya! Thanks dudes for trying! And LegoConqueror, you are the pro! But there's still 1 problem... the stove becomes color "192" and not the patties... anything else anyone?
Report Abuse
FlameFace is not online. FlameFace
Joined: 20 Sep 2007
Total Posts: 1406
25 Jan 2009 02:49 PM
function onTouch(hit)
if hit.Name ~= "Patty" then return end
wait(10)
hit.BrickColor =BrickColor.new(192)
wait(10)
hit.BrickColor = BrickColor.new(26)
end

script.Parent.Touched:connect(onTouch)
Report Abuse
LegoConqueror is not online. LegoConqueror
Joined: 07 Jan 2009
Total Posts: 1289
25 Jan 2009 02:50 PM
script.Parent.Touched:connect(function(p)
if p.Name == "Paty" then
wait(10)
p.BrickColor = BrickColor.new("192")
script.Parent.BrickColor = BrickColor.new("192")
wait(10)
script.Parent.BrickColor = BrickColor.new("26")
end
end)
Report Abuse
Jojomen56 is not online. Jojomen56
Joined: 20 Mar 2008
Total Posts: 463
25 Jan 2009 03:07 PM
Its not working anymore...
Report Abuse
Jojomen56 is not online. Jojomen56
Joined: 20 Mar 2008
Total Posts: 463
25 Jan 2009 03:10 PM
I got it! Script:

script.Parent.Touched:connect(function(p)
if p.Name == "Patty" then
wait(10)
p.BrickColor = BrickColor.new("192")
wait(10)
p.BrickColor = BrickColor.new("26")
end
end)

Yeah! But now... how do we make the countdown stop where it is when we take it off the stove? 'Cause now, if we put it and take it off right away, it still continues!
Report Abuse
Feezly is not online. Feezly
Joined: 26 Aug 2008
Total Posts: 1602
26 Jan 2009 03:25 PM
Whoops.
function onTouched(hit)
if hit.Name ~= "Patty" then return end
wait(10)
script.Parent.BrickColor.BrickColor.new(192)
wait(10)
script.Parent.BrickColor.BrickColor.new(26)
end

script.Parent.Touched:connect(onTouched)
Report Abuse
Jojomen56 is not online. Jojomen56
Joined: 20 Mar 2008
Total Posts: 463
26 Jan 2009 03:31 PM
Ah... I got that now. All I need is the stop-count when we take it off...
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