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: Change properties when touched by another brick?

Previous Thread :: Next Thread 
DawgINC is not online. DawgINC
Joined: 27 Apr 2012
Total Posts: 156
16 May 2012 08:34 PM
Ok so I want this brick to change to a random color when it touches another brick I have it create the brick the position of another brick and that works but I want it to change to a random color so heres my script:

function cc(hit)
if hit.Name == "bri" then
hit.BrickColor = BrickColor.new(math.random(1,255))
end end


That was the best I could do I tried and tried nothing please help?










(Yes I am trying to make a Tycoon Kit!
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
16 May 2012 08:46 PM
Here:

http://www.roblox.com/Tycoon-Making-Tutorial-UPDATES-item?id=33246086

Now, that is the new version, but I do have an older version that was taken over 1,100 times.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
16 May 2012 09:15 PM
You never had a connection line. If youdon't have a connection line, Lua will just think it's a regular function.

function cc(hit)
if hit.Name == "bri" then
hit.BrickColor = BrickColor.random()
end
end
script.Parent.Touched:connect(cc)
Report Abuse
thane1326 is not online. thane1326
Joined: 08 Apr 2009
Total Posts: 867
16 May 2012 10:56 PM
Thats the stuff right above! \//\\//\\//\\//\\//\\/
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