|
| 23 Nov 2013 02:33 PM |
Hi, so I am a REALLY new coder, I just started what, 3 hours ago? I need a little help here.
So for a basic script, I am trying to make a script which functions to make a brick named Happy turn to the color Really Red for 5 seconds, then revert to it's original color, white.
I've got all of the brick references and such, but the script doesn't seem to be working. Help? |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 23 Nov 2013 02:34 PM |
| Paste the code.... then we can help out... |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2013 02:34 PM |
local brick = Workspace.Happy
function onTouch(part) brick.BrickColor = ReallyRed wait(5) brick.BrickColor = White end
brick.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2013 02:36 PM |
local brick = Workspace.Happy
function onTouch(part) brick.BrickColor = BrickColor.new("Really red") wait(5) brick.BrickColor = BrickColor.new("Institutional white") end
brick.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2013 02:37 PM |
| Wow, I was way off... Thank you though. |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2013 02:44 PM |
That was in fact quite close, seeing that apparently you are a new scripter.
So what you want is:
BrickColor.new("Really red")
to change colour. There are other things like this, such as:
pt = Instance.new("Part", game.Workspace)
to create a new part which is inside the Workspace. |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2013 03:48 PM |
@bag
Thanks for the pointers, man.
Scripting is a labyrinth for me... |
|
|
| Report Abuse |
|
|
Poseidas
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 2659 |
|
|
| 23 Nov 2013 03:56 PM |
You're off to a better start than a lot of people.
Yours truly, Poseidas |
|
|
| Report Abuse |
|
|