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

Previous Thread :: Next Thread 
Miro034 is not online. 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 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Jan 2012 11:17 AM
Help?
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
05 Jan 2012 11:20 AM
Did you test it?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Jan 2012 11:26 AM
I can't. No time :P
Report Abuse
Miro034 is not online. 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 is not online. 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 is not online. 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 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Jan 2012 11:50 AM
I'm using a small netbook.
Report Abuse
wow75 is not online. 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 is not online. 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 is not online. 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 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Jan 2012 03:48 PM
Hey crazyman32, will that script work?
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
05 Jan 2012 03:50 PM
Crazy isn't here...
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
06 Jan 2012 11:00 AM
Oh ok. :D
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