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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How do I script user input data

Previous Thread :: Next Thread 
iScriptStuffz is not online. iScriptStuffz
Joined: 11 Sep 2015
Total Posts: 348
28 Oct 2015 11:12 AM
It is very easy in a language like javascript.
Ex:
x = prompt("What is your favorite color?");


How would I do this in Lua, more specifically, in a GUI. I would like to make a game where the user answers some questions first, so I can use custom models based on the user input in the beginning.
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
28 Oct 2015 11:14 AM
You make a TextBox...?

UserInputService is an option for outside Gui's or even in Gui's
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
28 Oct 2015 11:16 AM
sounds like I would use a TextBox/local script for this, and listen for when .FocusLost fires

local textbox = script.Parent

textbox.FocusLost:connect(function(enterPressed)
if enterPressed and textbox.Text == "Blue" then
print("Blue is "..game.Players.LocalPlayer.Name.."'s favorite color!")
end
end)

http://wiki.roblox.com/index.php?title=API:Class/TextBox/FocusLost

Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
28 Oct 2015 11:19 AM
I might add that to to my message module;


:Prompt()
:Message()
:Alert()
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
28 Oct 2015 11:22 AM
I'm going to leave this here

http://wiki.roblox.com/index.php/Absolute_beginner's_guide_to_scripting
Report Abuse
iScriptStuffz is not online. iScriptStuffz
Joined: 11 Sep 2015
Total Posts: 348
28 Oct 2015 11:40 AM
Thanks for all the help!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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