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 |
|
|
|
| 14 Mar 2014 07:16 PM |
| Step 1: give me your windforce!!!11 |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
| |
|
|
| 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 |
|
|