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: Liittle help.

Previous Thread :: Next Thread 
GhostLife5555 is not online. GhostLife5555
Joined: 22 Mar 2011
Total Posts: 94
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
GhostLife5555 is not online. GhostLife5555
Joined: 22 Mar 2011
Total Posts: 94
22 Aug 2014 12:23 AM
Bump
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
22 Aug 2014 12:24 AM
script.Parent

Remember,

CAPS matter!
Report Abuse
plistra is not online. plistra
Joined: 12 Mar 2014
Total Posts: 859
22 Aug 2014 12:25 AM
Where was the prick located again?
Report Abuse
GhostLife5555 is not online. GhostLife5555
Joined: 22 Mar 2011
Total Posts: 94
22 Aug 2014 12:27 AM
in workspace.
Report Abuse
plistra is not online. 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
GhostLife5555 is not online. GhostLife5555
Joined: 22 Mar 2011
Total Posts: 94
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 is not online. Marienus
Joined: 02 Jul 2012
Total Posts: 118
22 Aug 2014 02:03 AM
Capitalize "Parent". It's not "parent".
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
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 is not online. 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
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