|
| 22 Aug 2014 12:08 AM |
Okay so here is a script.
script.parent.BrickColor = BrickColor.new("Bright red")
The prick is located inside workspace and contains this script ^ in it.
How does it locate the brick? I mean... Should not it be game.Workspace.brick.script? |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Aug 2014 12:24 AM |
script.Parent
Remember,
CAPS matter! |
|
|
| Report Abuse |
|
|
plistra
|
  |
| Joined: 12 Mar 2014 |
| Total Posts: 859 |
|
|
| 22 Aug 2014 12:25 AM |
| Where was the prick located again? |
|
|
| Report Abuse |
|
|
| |
|
plistra
|
  |
| Joined: 12 Mar 2014 |
| Total Posts: 859 |
|
|
| 22 Aug 2014 12:28 AM |
So, the prick is in the workspace?
...
the prick is? |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2014 12:31 AM |
a block....?
The script is supposed to change it's color to change the brick's color to bright red and it does that.
But I do not understand why do you use
script.parent.BrickColor = BrickColor.new("Bright red")
to locate the block instead of
game.Workspace.brick.Script |
|
|
| Report Abuse |
|
|
Marienus
|
  |
| Joined: 02 Jul 2012 |
| Total Posts: 118 |
|
|
| 22 Aug 2014 02:03 AM |
| Capitalize "Parent". It's not "parent". |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2014 02:11 AM |
Let me explain. "Parent" is a property of all classes and sub-classes. It addresses the direct-Ancestor that the class descends from hierarchically. So, game.Workspace.Parent addresses the DataModel, the direct ancestor of Workspace. |
|
|
| Report Abuse |
|
|
plistra
|
  |
| Joined: 12 Mar 2014 |
| Total Posts: 859 |
|
|
| 23 Aug 2014 07:56 AM |
| I'm making a joke at the fact that you said "PRICK", not "BRICK". |
|
|
| Report Abuse |
|
|