|
| 12 Nov 2013 11:24 PM |
Ok im trying to keep track of an character, in my game. Imcthinking an object value could help. Im not familiar with object values, so just a few questions. If i just haveba script like this in he object value, will it just get the object no matter where it is?
script.Parent.Value = brick
And another question, if a character dies, it probably resets the value of the objet to right? I just want to know a little more about how objectvalues can be used, the wiki doesnt explain much. |
|
|
| Report Abuse |
|
Conmiro
|
  |
| Joined: 13 Oct 2008 |
| Total Posts: 3393 |
|
|
| 13 Nov 2013 02:08 AM |
No, you have to set the object value to the exact reference of the object.
Say you have a part called "temp" in workspace.
If this script was placed inside an object value, to set it would be:
script.Parent.Value = Workspace.temp
Now to edit that part would be:
script.Parent.Value.Size = Vector3.new(5,5,5)
............. Object values basically hold the exact reference. As such:
game.Workspace.ObjectValue.Value.Size = Vector3.new(1,1,1) and game.Workspace.temp.Size = Vector3.new(1,1,1)
are identical.
|
|
|
| Report Abuse |
|