|
| 21 Nov 2014 10:30 PM |
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) -- Check the player has a stats object local stats = player:FindFirstChild('leaderstats') if not stats then return end -- And that the stats object contains a Credits member local credits = stats:FindFirstChild('Credits') if not credits then return end if choice == script.Parent.DialogChoice.Thermals then if credits.Value >= 50 then -- value is the amount of Credits you need to purchase this weapon game.ReplicatedStorage.Thermals:Clone().Parent = player.Backpack credits.Value = credits.Value - 50 -- subtract the amount of Credits you need to purchase end elseif choice == dialog.DialogChoice.Z6 then if credits.Value >= 50000 then game.ReplicatedStorage.Z6:Clone().Parent = player.Backpack credits.Value = credits.Value - 50000 end elseif choice == dialog.DialogChoice.DC17M then if credits.Value >= 500 then game.ReplicatedStorage.DC17M:Clone().Parent = player.Backpack credits.Value = credits.Value - 500 end elseif choice == dialog.DialogChoice.DC15S then if credits.Value >= 250 then game.ReplicatedStorage.DC15S:Clone().Parent = player.Backpack credits.Value = credits.Value - 250 end end end)
Problem : It only allows a person to buy only 2 weapons(Any) then the gun shop doesnt allow to let the user buys another. |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 22 Nov 2014 12:39 AM |
| Check your mulas, do you have enough cash for next item? |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2014 01:30 AM |
| Yeah I have more than enough.It only allows purchase to be made twice per person |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2014 09:12 AM |
| Could there be a difference if Placed it in Lighting instead of ReplicatedStorage? |
|
|
| Report Abuse |
|
|
MrEpic534
|
  |
| Joined: 12 May 2012 |
| Total Posts: 1349 |
|
| |
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 22 Nov 2014 01:52 PM |
Yes it's a problem if you placed it in lighting instead of ReplicatedStorage silly..
When the script indexes REPLICATEDSTORAGE you don't store it in LIGHTING
c; |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2014 06:26 AM |
I meant if I change the REPLICATEDSTORAGE to Lighting aswell. Will the same problem Occur?
-Sorry for the late reply. |
|
|
| Report Abuse |
|
|