So i made a story game where the npc talks, but when it reachs the end of the dialogue, it goes all again
Dialogue script:
while true do script.Parent.Text = "Hello and welcome to the game, my name is Thomas and I will be your guide" wait (10) script.Parent.Text = "Today we will be exploring that cave behind me, maybe we can find something great!" wait (10) script.Parent.Text = "Well, do you see these cabins behind me? These will be your home in this trip" wait (10) script.Parent.Text = "Ok, now that we are ready, let's go!" wait(1) end
You aren't using break
so the code will always repeat.
while true do script.Parent.Text = "Hello and welcome to cave trip, my name is Thomas and I will be your guide" wait (10) script.Parent.Text = "Today we will be exploring that cave behind me, maybe we can find something great!" wait (10) script.Parent.Text = "Well, do you see these cabins behind me? These will be your home in this trip" wait (10) script.Parent.Text = "Ok, now that we are ready, let's go!" wait(1) break end
This will stop the loop after it goes through the loop once, because of the break
.