im making a dialogue script that changes the dialogue box when an image button is clicked im getting the error in the title
while true do wait(0.1) game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.ImageButton.MouseButton1Down:Connect(function() local words = {"Test1", "Test2"} local wordSelect = words[math.random(1, #words)] game.StarterGui.DialogueGui.Frame.Dialogue.Text = worldSelect end) end
The issue is that you typed "worldSelect" instead of "wordSelect".