a = script.Parent.Text
b = script.Parent.Parent.ChoiceTwo.Text
c = script.Parent.Parent.ChoiceThree.Text
t = script.Parent.Parent.Textbox
function onButtonClicked()
if a == "text1" then
a = "text2"
b = "text3"
c = "text4"
t = "text5"
print("This button got clicked.")
elseif a == "text2" then
a = "text6"
b = "text7"
c = "text8"
t = "text9"
elseif a == "text6" then
game.Players.LocalPlayer.Character.Health = 0
elseif a == "text10" then
game.Players.LocalPlayer.Character.Health = 0
end
end
script.Parent.MouseButton1Click:connect(onButtonClicked)
(I placed filler text in the quotation marks instead of out-of-context quotes. The numbers are mostly arbitrary.)
When this button is clicked, it should change the text of other textboxes and its own text. However, when I test it out, something is wrong. When clicked, the text doesn't change, but the Output prints "This button got clicked." and any clicks after that don't do anything. There are no other errors in Output. Why does it skip over the text edits and go straight to print("This button got clicked.")?

1 comment
Thank you, it works now!