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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 25 Jan 2009 01:56 PM |
| forgot a wait(10) but you can add that. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 20 Mar 2008 |
| Total Posts: 463 |
|
|
| 25 Jan 2009 03:07 PM |
| Its not working anymore... |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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 |
|
|