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: ObjectValue

Previous Thread :: Next Thread 
natonator200 is not online. natonator200
Joined: 08 Nov 2011
Total Posts: 10
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 is not online. 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
natonator200 is not online. natonator200
Joined: 08 Nov 2011
Total Posts: 10
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
natonator200 is not online. natonator200
Joined: 08 Nov 2011
Total Posts: 10
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
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