|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
| |
|