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
 

Dialogs

Previous Thread :: Next Thread 
dusteaty is not online. 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
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
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
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