When a new mission (e.g., “CartaoEncontrado”) is triggered while another mission (e.g., “SemCartau”) is still ongoing, there are conflicts in how the UI element (like LabelTu) is updated. This results in problems like:
- Overlapping text or the label not showing at all.
Code:
if mission == "SemCartau" and not missionScreenGui.Enabled then
missionLabel.Text = "Encontra o cartão escolar"
legendaGUI.Enabled = true
legendaLabel.Text = "<b>VOZ:</b> Pedro.. Sabiamos que irias chegar."
wait(4)
legendaLabel.Text = "<b>VOZ:</b> O que procuras, para além do portão vai estar."
wait(4)
legendaLabel.Text = "<b>VOZ:</b> Se a verdade anseias em desvendar,"
wait(2.5)
legendaLabel.Text = "<b>VOZ:</b> Com o cartão em mãos, deves regressar.."
wait(4)
legendaGUI.Enabled = false
fadeinMission1()
cartaogiver.Parent = workspace
wait(2)
tinha:Play()
proximitycartao.Enabled = true
LabelTu.Visible = true
LabelTu.Text = "<b>EU:</b> Eu tinha o cartão, Como é que eu o perdi?"
legendaTU.Enabled = true
wait(3)
LabelTu.Text = "<b>EU:</b> E.. quem és tu? Porque estás na minha cabeça?"
wait(4)
LabelTu.Text = "<b>EU:</b> Não faz sentido, mas eu preciso entender.."
wait(3)
LabelTu.Text = "<b>EU:</b> Vou encontrar o cartão e descobrir a verdade.. Custe o que custar."
wait(3)
legendaTU.Enabled = false
elseif mission == "CartaoEncontrado" and missionScreenGui.Enabled then
tinha.Playing = false
LabelTu.Visible = false
missionLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
fadeoutMission2()
espero:Play()
LabelTu.Visible = true
LabelTu.Text = "<b>EU:</b> Mas.. como é que foste parar aqui?"
legendaTU.Enabled = true
wait(2.2)
LabelTu.Text = "<b>EU:</b> Isto está tão estranho e confuso.."
wait(3)
LabelTu.Text ="<b>EU:</b> Bem.. pelo menos agora consigo entrar na escola."
wait(4)
teste.Enabled = true
iconcartao.Enabled = true
BindableEvent:Fire("PassaOCartao")
teste.Enabled = true
legendaTU.Enabled = false