Confirmation button not working properly

So I’m trying to make a troll game and part of it is that someone has to click next repeatedly to see that they got trolled. I’m trying to make the “How to play” text change what it says to make it look like the user if confirming to move on to the game.

Script

local Text = script.Parent.Parent.Main
local btn = script.Parent

btn.Visible = false
wait(5)
btn.Visible = true

btn.MouseButton1Click:Connect(function()
	Text.Text = "Are you sure?"
end)

btn.MouseButton1Click:Connect(function()
	Text.Text = "Are you really sure?"
end)

btn.MouseButton1Click:Connect(function()
	Text.Text = "I mean have you even considered?"
end)

btn.MouseButton1Click:Connect(function()
	Text.Text = "Cmon just think about it for a sec"
end)

btn.MouseButton1Click:Connect(function()
	Text.Text = "Stop pressing next just think for a minute"
end)

btn.MouseButton1Click:Connect(function()
	Text.Text = "I SAID STOP"
end)

btn.MouseButton1Click:Connect(function()
	Text.Text = "I won't allow you"
end)

btn.MouseButton1Click:Connect(function()
	Text.Text = "You could have just pressed the skip button hidden in the top left corner lol"
end)

I haven’t really needed to make a game with text changing ui so I’m new to this part right here. If anyone can tell me what I need to fix that would be much appreciated!

1 Like

This part works it’s just the rest of it

.MouseButton1Click is just creating a connection, making it multiple times won’t do anything. I think you can try…

local btn = your button here
local Text = your textlabel here

-- Making a table of ALL your messages *in order*
local textTable = {
    "are u sure?",
    "are you REALLY sure?",
    "so on and",
    "so forth :)"
}
-- A way of keeping track of the table
local messageNumber = 0

-- You know what this does :)
btn.MouseButton1Click:Connect(function()
     -- Go to our next message
    messageNumber += 1

    -- Setting our new text!
    Text.Text = textTable[messageNumber]
end)

Thank you so much this helped a lot