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

How do I make text on a GUI continuously change until clicked?

Asked by 6 years ago
Edited 6 years ago

I am trying to make a GUI that has the text continuously change until clicked to type other text in, but nothing is working, could someone help? (Btw I have a boolean value) (It's also a text box.)

script.Parent.MouseButton1Click:connect(function()
script.Parent.Value = false
end)

if true then
wait(1)
script.Parent.Text = "PassWord_"
wait(1)
script.Parent.Text = "PassWord"
end

Also, I am somewhat of a noob when it comes to scripting, so could you go a little easy on me?

1 answer

Log in to vote
0
Answered by 6 years ago

Local Script, Hopefully this is what you mean.

local texts = {"Hi", "wixjfjs", "912838", "wjiapapsjfjfk", "What", "This will keep going until clicked"}
local clicked = false


while clicked == false do
    for _, v in pairs(texts) do
        script.Parent.Text = v
        wait(1) -- Add this so it doesn't immediately change.
    end
    wait()
end

script.Parent.MouseButton1Click:Connect(function()
    clicked = true
end)
Ad

Answer this question