So, as some may know, I am currently working on a Story game. I have tried a few tutorials online to make a dialogue script, (Since I am bad at GUI scripting) but when I go into the game, it only shows the first letter.
It is supposed to say “Let’s wait for others to load!”
local textLabel = script.Parent
local text
function SoundEffect()
local sound = Instance.new("Sound", workspace.Sounds.SoundEffects)
sound.SoundId "rbxassetid://179235828"
sound.PlaybackSpeed = 1
sound.Volume = 1
sound:Play()
coroutine.resume(coroutine.create(function()
wait(1)
sound:Destroy()
end))
end
function SetText(text)
text = text
for i = 1, #text do
textLabel.Text = string.sub(text,1,i)
SoundEffect()
textLabel.TextColor3 = Color3.fromRGB(255,255,255)
wait(0.05)
end
end
SetText("Let's wait for others to load!")
wait(10)
local textLabel = script.Parent
local text
function SoundEffect()
local sound = Instance.new("Sound", workspace.Sounds.SoundEffects)
sound.SoundId "rbxassetid://179235828"
sound.PlaybackSpeed = 1
sound.Volume = 1
sound:Play()
coroutine.resume(coroutine.create(function()
wait(1)
sound:Destroy()
end))
end
function SetText(text)
text = text
for i = 1, #text do
textLabel.Text = string.sub(text,1,i)
SoundEffect()
textLabel.TextColor3 = Color3.fromRGB(255,255,255)
wait(0.05)
i = i + 1
end
end
SetText("Let's wait for others to load!")
wait(10)
local textLabel = script.Parent
function SetText(text)
text = text
for i = 1, #text do
local g = string.sub(text,1,i)
textLabel.Text = g
textLabel.TextColor3 = Color3.fromRGB(255,255,255)
print(g)
wait(0.1)
end
end
SetText("Let's wait for others to load!")
wait(10)
or Maybe the textlabel size is too small, so it can only show one text and the others are cut out of the frame