It was all working fine but when i made the DisAndAppear line it just completely broke, it might be a typo or something else.
if you have any questions i will answer them as quickly as possible
Thanks for the feedback already
--| Full Script Below |--
--/Samples/--
--BR-- <br />
--[]-- <font color='rgb(170, 170, 170)'>
--Player mention-- <font color='rgb(135, 189, 255)'>
--Orblio mention-- <font color='rgb(161, 202, 255)'>
--UDG-- <font color='rgb(104, 221, 166)'>
--Important-- <font color='rgb(255, 195, 98)'>
--/Endings/--
--Fonts-- </font>
--/Texts/--
local Welcome = "Welcome <font color='rgb(135, 189, 255)'>New Player</font> to <font color='rgb(104, 221, 166)'>Untitled Demolition Game</font>.<br />You can call me <font color='rgb(161, 202, 255)'>Orblio</font> because my creator calls me like that. <font color='rgb(170, 170, 170)'>[tap me to continue]</font>"
local Introduction = "Great! Since i introduced my self, i can now say that i will be <font color='rgb(255, 195, 98)'>Your Guide</font> in this Game.<br />If you are gonna <font color='rgb(255, 195, 98)'>Learn</font> something new <font color='rgb(170, 170, 170)'>[like now]</font>, im gonna help you with it!"
local Explaination = "If that happends you can click the <font color='rgb(255, 195, 98)'>*Down Arrow*</font> icon above <font color='rgb(255, 195, 98)'>My Head</font> of your screen.<br />But now i will guide you how the <font color='rgb(255, 195, 98)'>basics</font> of the game works!"
local DisAndAppear = "Now let's test if the Arrow Button works!<br />Just click the Button and the Dialog should disapear, if you want it to show up again press it Again!"
--/Variables/--
local DialogText = script.Parent
local ContinueButton = DialogText.Parent.Parent.MimiFrame.TextButton
local CloseButton = DialogText.Parent.Parent.CloseFrame.TextButton
local Player = game:GetService("Players").LocalPlayer
--/Script/--
ContinueButton.MouseButton1Click:Connect(function()
wait(0.6)
print("Text has been updated!")
if DialogText.Text == Explaination then
DialogText.Text = DisAndAppear
end
wait(0.01)
if DialogText.Text == Introduction then
DialogText.Text = Explaination
CloseButton.Parent.Visible = true
end
wait(0.01)
if DialogText.Text == Welcome then
DialogText.Text = Introduction
end
end)
this script is confusing me, what exactly is broken and what are you trying to accomplish?
edit: i think i understand now, if ur talking about how it doesnt change ur setting text to DisAndAppear then checking if its the Introduction which wont work because its DisAndAppear then also checking if its welcome which wont work because its still DisAndAppear
I get why you where confused since im not that good at scripting.
I will try those posibilties and see is they work, if you could can you make a new script? Its not needed
is this what you wanted? i tried to avoid changing anything else
local texts = {
"Welcome <font color='rgb(135, 189, 255)'>New Player</font> to <font color='rgb(104, 221, 166)'>Untitled Demolition Game</font>.<br />You can call me <font color='rgb(161, 202, 255)'>Orblio</font> because my creator calls me like that. <font color='rgb(170, 170, 170)'>[tap me to continue]</font>",
"Great! Since i introduced my self, i can now say that i will be <font color='rgb(255, 195, 98)'>Your Guide</font> in this Game.<br />If you are gonna <font color='rgb(255, 195, 98)'>Learn</font> something new <font color='rgb(170, 170, 170)'>[like now]</font>, im gonna help you with it!",
"If that happends you can click the <font color='rgb(255, 195, 98)'>*Down Arrow*</font> icon above <font color='rgb(255, 195, 98)'>My Head</font> of your screen.<br />But now i will guide you how the <font color='rgb(255, 195, 98)'>basics</font> of the game works!",
"Now let's test if the Arrow Button works!<br />Just click the Button and the Dialog should disapear, if you want it to show up again press it Again!"
}
local DialogText = script.Parent
local ContinueButton = DialogText.Parent.Parent.MimiFrame.TextButton
local CloseButton = DialogText.Parent.Parent.CloseFrame.TextButton
local Player = game:GetService("Players").LocalPlayer
local cooldown = false
ContinueButton.MouseButton1Click:Connect(function()
if cooldown then
return
end
cooldown = true
for _, text in pairs(texts) do
DialogText.Text = text
task.wait(2)
end
cooldown = false
end)
Building off of @Inkthirsty’s script, you can achieve that by simply indexing messages in an array like Ink made, but with a counter.
local texts = {
"Welcome <font color='rgb(135, 189, 255)'>New Player</font> to <font color='rgb(104, 221, 166)'>Untitled Demolition Game</font>.<br />You can call me <font color='rgb(161, 202, 255)'>Orblio</font> because my creator calls me like that. <font color='rgb(170, 170, 170)'>[tap me to continue]</font>",
"Great! Since i introduced my self, i can now say that i will be <font color='rgb(255, 195, 98)'>Your Guide</font> in this Game.<br />If you are gonna <font color='rgb(255, 195, 98)'>Learn</font> something new <font color='rgb(170, 170, 170)'>[like now]</font>, im gonna help you with it!",
"If that happends you can click the <font color='rgb(255, 195, 98)'>*Down Arrow*</font> icon above <font color='rgb(255, 195, 98)'>My Head</font> of your screen.<br />But now i will guide you how the <font color='rgb(255, 195, 98)'>basics</font> of the game works!",
"Now let's test if the Arrow Button works!<br />Just click the Button and the Dialog should disapear, if you want it to show up again press it Again!"
}
local DialogText = script.Parent
local ContinueButton = DialogText.Parent.Parent.MimiFrame.TextButton
local CloseButton = DialogText.Parent.Parent.CloseFrame.TextButton
local Player = game:GetService("Players").LocalPlayer
local currentIndex = 1
ContinueButton.MouseButton1Click:Connect(function()
local textToShow = texts[currentIndex]
DialogText.Text = textToShow
currentIndex += 1
if currentIndex > #texts then
currentIndex = 1
end
end)
Here, this should do it:
Problem: Your if DialogText.Text == … chain breaks once you set a new line (e.g., to DisAndAppear); the later checks won’t match. Also that “for loop” version auto-plays all lines on a single click.
Fix: Track a step index and set the text from an array. One click = next step. Use Activated so it works on mouse + touch. Enable RichText.
This should do what you want:
-- texts in order
local texts = {
"Welcome <font color='rgb(135, 189, 255)'>New Player</font> to <font color='rgb(104, 221, 166)'>Untitled Demolition Game</font>.<br />You can call me <font color='rgb(161, 202, 255)'>Orblio</font> because my creator calls me like that. <font color='rgb(170, 170, 170)'>[tap me to continue]</font>",
"Great! Since i introduced my self, i can now say that i will be <font color='rgb(255, 195, 98)'>Your Guide</font> in this Game.<br />If you are gonna <font color='rgb(255, 195, 98)'>Learn</font> something new <font color='rgb(170, 170, 170)'>[like now]</font>, im gonna help you with it!",
"If that happens you can click the <font color='rgb(255, 195, 98)'>*Down Arrow*</font> above <font color='rgb(255, 195, 98)'>my head</font>.<br />Now I’ll show you the <font color='rgb(255, 195, 98)'>basics</font>!",
"Now let's test the Arrow Button!<br />Click it to hide the dialog; click again to show it."
}
-- ui refs
local DialogText = script.Parent -- TextLabel
local ContinueButton = DialogText.Parent.Parent.MimiFrame.TextButton
local CloseButton = DialogText.Parent.Parent.CloseFrame.TextButton
-- init
DialogText.RichText = true
local step = 1
DialogText.Text = texts[step]
-- optional per-step side effects
local stepActions = {
[3] = function() CloseButton.Parent.Visible = true end, -- when we reach line 3, show close button
}
local busy = false
local function nextLine()
if busy then return end
if step >= #texts then return end
busy = true
step += 1
DialogText.Text = texts[step]
if stepActions[step] then stepActions[step]() end
task.defer(function() busy = false end)
end
-- click/tap to advance
ContinueButton.Activated:Connect(nextLine)
-- simple hide/show test for the “disappear” step
CloseButton.Activated:Connect(function()
local frame = DialogText.Parent -- your dialog container
frame.Visible = not frame.Visible
end)
I really don’t understand the script, but it works. if there is a simplified way to make such a script could you do that? (so i can tweak things when things show up or what ever and i can use this script for other scripts)