(My coding knowledge is horrid, so apologies if I made a simple mistake)
I am creating a dialog box with options that provides a different outcome when a specific button is pressed. The way I get the old message to disappear and the new message to appear is through these scripts:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Chat:Destroy()
wait()
script.Parent:Destroy()
end)
When I click the button, it destroys the old text box and the text button itself, but with my other script to get the new message to display:
script.Parent.MouseButton1Click:Connect(function()
local Text = "asdfasfsasa"
for i = 1,#Text do
script.Parent.Parent.Chat2.Text = string.sub(Text,1,i)
wait(0.05)
end
I think it's supposed to activate when I press on the button as well, and then proceed to change the text of Chat2's text box, but it does not work.
How do I fix this? Thanks in advance.

2 comments
any errors? and is this a localscript?
In the output I got this error: Players.Voyagis.PlayerGui.QuestTake.Background.Huh.Script:7: Expected 'end' (to close 'function' at line 1), got Also, it's not a local script.