Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My GUI isn't working. Can you please help?

Asked by 8 years ago

Earlier today I asked how to do something like a raw_input from Python in LUA. I got my answer and it worked in Roblox Studio. But, in an actual server, it does not. Hopefully someone can help me! Thank you.

The script:

local input = script.Parent.TextBox local output = script.Parent.TextLabel

local function raw_input(prompt) local text = "" output.Text = prompt input:CaptureFocus() local event = input.FocusLost:connect(function(enterPressed) if enterPressed and input.Text ~= "" then text = input.Text else input:CaptureFocus() end end) repeat wait() until text ~= "" return text end

local response = raw_input("What is your name?")

output.Text = "Hello, " .. response .. "!"

The game: https://www.roblox.com/games/415162802/wip

Answer this question