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

How do you change text label with text button?

Asked by 8 years ago

I want a button so when pressed it changes the text in a text label. What I have currently:

local Button = script.Parent

while true do
wait (0.1)
function textchange()
if script.Parent.Visible==true then
    Button.MouseButton1Down:connect (function()
        script.Parent.Parent.Speech.Text="How are you."

end)
    end
end
end

Please help.

0
Lots of things you have currently are not needed. I've given you a script you can use. Acheo 230 — 8y

1 answer

Log in to vote
0
Answered by
Acheo 230 Moderation Voter
8 years ago
script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Speech.Text = "How are you?"
end)
0
thanks it works! lordofpoo 22 — 8y
0
Glad I could help! Acheo 230 — 8y
Ad

Answer this question