|
| 17 Jul 2014 12:01 PM |
how do you set an ObjectValue's value?
this is what i have tried:
c = Instance.new("ObjectValue") c.Parent = game.Vehicles.Tycoon.Stuff c.Value = lighting[CopPorsche911] c.Name = "CopPorsche911"
the model the value needs to be set to is:
lighting.Vehicle Storage [ItemId: 6916].CopPorsche911
|
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 17 Jul 2014 12:03 PM |
Lighting is not a variable and the object in the block parenthesis have to be a string... why don't you use the output?
c.Value = game.Lighting["CopPorsche911"] |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 09:28 PM |
| oh ok thankyou (im not a programmer btw i gust scooped that up from a couple scripts) |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 09:36 PM |
ok i patched you suggestion in but it hilighted the third line in red.
c = Instance.new("ObjectValue") c.Parent = Game.workspace.Vehicles.Tycoon.Stuff c.Value = game.Lighting["CopPorsche911"] c.Name = "CopPorsche911"
Thanks for helping though.
btw is there any other way to set an objectvalue's value? |
|
|
| Report Abuse |
|
|