isaacfrye
|
  |
| Joined: 12 Jul 2008 |
| Total Posts: 230 |
|
|
| 15 Aug 2012 09:38 PM |
I am working on a Skyrim game with treasure chests, ofcourse everything found in chests are free to take, it works exactly like a shop except being free, so the thing I need to know, is how to edit this script so it limits the buyer to only one. or if maybe it is only possible through editing a different script, or making another one? I don't know, but I would appreciate all the help I can get.
player = script.Parent.Parent.Parent.Parent.Parent money = player.leaderstats.gold -- Change Gold to the money you want to be used to buy the item price = 0 -- Your price goes here tool = game.Lighting:findFirstChild("iron dagger")
_____________________________________________ player = script.Parent.Parent.Parent.Parent.Parent money = player.leaderstats.goldused to buy the item price = 0 tool = game.Lighting:findFirstChild("iron dagger")
function buy() if money.Value >= price then money.Value = money.Value - price local a = tool:clone() a.Parent = player.Backpack local b = tool:clone() b.Parent = player.StarterGear
end end script.Parent.MouseButton1Down:connect(buy) _____________________________________________ |
|
|
| Report Abuse |
|
|
isaacfrye
|
  |
| Joined: 12 Jul 2008 |
| Total Posts: 230 |
|
|
| 15 Aug 2012 09:39 PM |
ignore that little double post, read only the script part in the box |
|
|
| Report Abuse |
|
|
jmr11b
|
  |
| Joined: 19 Aug 2010 |
| Total Posts: 806 |
|
|
| 15 Aug 2012 10:06 PM |
| Check the players Backpack for the sword when they try to buy it. If they have it, break. |
|
|
| Report Abuse |
|
|
jmr11b
|
  |
| Joined: 19 Aug 2010 |
| Total Posts: 806 |
|
|
| 15 Aug 2012 10:07 PM |
| And if its free you don't need the price lol. |
|
|
| Report Abuse |
|
|
jmr11b
|
  |
| Joined: 19 Aug 2010 |
| Total Posts: 806 |
|
|
| 15 Aug 2012 10:10 PM |
| Wait, this is a Gui? Mind explaining a little further on how you are aquiring this chest? Do you touch at and get a Gui? |
|
|
| Report Abuse |
|
|