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

Can you help fix my gui?

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 The other question I asked: https://scriptinghelpers.org/questions/31405/how-do-you-use-raw_input-from-python-in-rblx-lua

0
What error are you getting? TheHospitalDev 1134 — 8y
0
It shows no error in Roblox Studio. It works in Roblox Studio. But, when me and my friend join a server, it doesn't work. It asks what your name is. Then you type something. and nothing else shows up like its supposed to. caelyn1567 10 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Is this in a local script?

Ad

Answer this question