When I click the TextButton, the ImageLabel won't change!
button = script.Parent.Parent.Parent.Parent.ScreenGui.Frame.ImageButton text = script.Parent.Parent.Parent.Parent.ScreenGui.Frame.TextLabel local chats = { "Hello"; "Hi"; } function Click() button.Image = "rbxassetid://271666611" text.Text = chats[math.random(1, #chats)] end
I forgot a a line in the script
Currently, you've not called the function named "Click", it's only be defined.
To get the image to change, you need to place the code button.MouseButton1Down:connect(Click)
on line 11.
This will call the function whenever the button is clicked.
Locked by HungryJaffer, Spongocardo, and woodengop
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?