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: Tools/Gear Data Persistence

Previous Thread :: Next Thread 
KodakKid3 is not online. KodakKid3
Joined: 25 Dec 2008
Total Posts: 2860
14 Mar 2014 07:10 PM
The script gives you an item from Lighting if you have enough money for it, and saves it in StarterGear, so if you buy it and reset, you still have it.

I want to be able to buy an item, leave the game, then come back and still have it (So save it with DataPersistence).

Another problem, this uses a LocalScript, which doesn't support DP, and I don't know how to make it without a local script.

It's a LocalScript within a TextButton.

help pls

Thanks

local Wep = "AssaultRifle" --Item Name
local Cos = 2860 --Item Price

local plr = game.Players.LocalPlayer
Mon = plr.leaderstats.Money

function onClick()
if Mon.Value >= Cos then
Mon.Value = Mon.Value - Cos
game.Lighting[Wep]:Clone().Parent = plr.Backpack
game.Lighting[Wep]:Clone().Parent = plr.StarterGear
end
end
script.Parent.MouseButton1Down:connect(onClick)
Report Abuse
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
14 Mar 2014 07:16 PM
Step 1: give me your windforce!!!11
Report Abuse
KodakKid3 is not online. KodakKid3
Joined: 25 Dec 2008
Total Posts: 2860
14 Mar 2014 07:24 PM
ok after you fix this pls i need you
Report Abuse
KodakKid3 is not online. KodakKid3
Joined: 25 Dec 2008
Total Posts: 2860
14 Mar 2014 07:33 PM
PLEASE HELP
Report Abuse
TheEmblaze is not online. TheEmblaze
Joined: 28 Jul 2013
Total Posts: 4432
14 Mar 2014 08:07 PM
you could give each weapon an id like 1, 2, 3, 4, etc and make it give the player the gear that has that id when they enter/respawn

blaze it|ayy lmao
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