Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 05 Jan 2012 10:58 AM |
function onTouched(hit) print("Brick Hit") local human = hit.Parent:findFirstChild("Color") if (human ~= nil ) then if script.Parent.Color.Value ~= BrickColor.Black() and BrickColor.BrightRed() then script.Parent.script.Disabled = true print("Worked!") end end end script.Parent.Touched:connect(onTouched)
Does this work? When the hitter touches it, it checks if it has Color Value, then it checks if it's value is color Black and BrightRed. Then when those objectives completed, the script will be disabled. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 05 Jan 2012 11:48 AM |
| And I can't test because it will slow my compter down ifI edit my place. |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 05 Jan 2012 11:48 AM |
| Lol, well, when you get the time, test it, and if it doesnt work, then come back to us, but it looks fine to me... |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 05 Jan 2012 11:49 AM |
| Yeah, im pretty laggy too, but i use my mom's CPU 1/2 the day... |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 05 Jan 2012 11:50 AM |
| I'm using a small netbook. |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 05 Jan 2012 11:53 AM |
| *Googles netbook* Ah, i see... Well then ill test it for you. |
|
|
| Report Abuse |
|
|
asianpunk
|
  |
| Joined: 15 Dec 2010 |
| Total Posts: 150 |
|
|
| 05 Jan 2012 12:19 PM |
function onTouched(hit) print("Brick Hit") local human = hit.Parent:findFirstChild("Color") if (human ~= nil ) then if script.Parent.Color.Value ~= BrickColor.new("Black") or script.Parent.Color.Value ~= BrickColor.new("BrightRed") then -- put these two thing on the same line script.Parent.script.Disabled = true print("Worked!") end end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 05 Jan 2012 01:10 PM |
| Thanks asianpunk. I'll test that out tomorrow if I used meh giant computeh. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 05 Jan 2012 03:48 PM |
| Hey crazyman32, will that script work? |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|