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: How do i save the player as an object in a tycoon?

Previous Thread :: Next Thread 
CyberManiacReborn is not online. CyberManiacReborn
Joined: 29 Jan 2011
Total Posts: 839
21 Jul 2011 10:08 AM
im making a tycoon and i need to save the player as an object. then whenever somebody presses the button,i need to make the script check if the player is the same one as the one saved.

Anyone know how to do that?
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
21 Jul 2011 10:11 AM
Instead of saving the player, save the name.

Make a StringValue object and save the owner's name to the StringValue's Value property. If nobody owns it, set the StringValue's value to a blank string ("").

Check for a blank string when they want to claim it, and if they can, set their name.

No need to use complicated ObjectValues!

~Ozzy
Report Abuse
CyberManiacReborn is not online. CyberManiacReborn
Joined: 29 Jan 2011
Total Posts: 839
21 Jul 2011 10:18 AM
thx...now how do i make a StringValue?
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
21 Jul 2011 10:19 AM
In Studio,
Insert > Object > StringValue

Or via script:
Instance.new("StringValue", workspace)
Report Abuse
CyberManiacReborn is not online. CyberManiacReborn
Joined: 29 Jan 2011
Total Posts: 839
21 Jul 2011 10:23 AM
thx
Report Abuse
CyberManiacReborn is not online. CyberManiacReborn
Joined: 29 Jan 2011
Total Posts: 839
21 Jul 2011 10:36 AM
ok, im in roblox studio and clicked string value. Under Players there is the "Value". I made the value (""). Now how do i save the owner to the stringvalue?
Report Abuse
CyberManiacReborn is not online. CyberManiacReborn
Joined: 29 Jan 2011
Total Posts: 839
21 Jul 2011 10:49 AM
nvm,i think i got it,i draged the "OwnerName" thingys to the "Value". I set the value for the string value to (""). I left the values blank for the OwnerName thingys. Is that right?
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