dusteaty
|
  |
| Joined: 14 Feb 2009 |
| Total Posts: 3590 |
|
|
| 27 Feb 2012 11:52 PM |
Is this the Script that I use for a NPC Shop Dialog? I want it to sell a player a certain item depending on which one they choose using the Dialog. Also im quite new to Dialogs, so where would I put it? So far im good with the Dialog Box and choices just not the scripts.
workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) print(player.Name,choice.Name) end) |
|
|
| Report Abuse |
|
|
| 28 Feb 2012 12:32 AM |
workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) print(player.Name,choice.Name) if choice.Name == "ChoiceName" then local Cash = ## -- replace ## with a number if player.leaderstats.Cash.Value >= Cash then --your stuffs here end end end)
NOTE: To use this script you need a leaderstats and Cash, to make it add a IntValue into the Player then name it "leaderstats" then add a IntValue into the leaderstats and name it "Cash" then the script is ready. |
|
|
| Report Abuse |
|