So ive made a Diolauge System and When the Player clicks the option "Sure" I want A text Label to destroy. But thats the part im stuck on so could anyone help me. Here is the code
Local D = game.StartergGui.QuestGui.NoQ
Sure.MouseButton1Click:Connect(function() D:Destroy() <----------- That is the destroy code that doesent work
if script.Parent.Parent.Parent.TalkGui.TalkFrame.Dialogue.Text == "Hey kid Can you Do somthing for me?" then
local text = "Well i cant find My radio, last time i saw it I was at this abbandoned place"
local length = string.len(text)
for i = 1, length do
script.Parent.Parent.Parent.TalkGui.TalkFrame.Dialogue.Text = text:sub(1, i)
wait(0.04)
end
wait(0.5)
script.Parent.Parent.Parent.ButtonGui.ButtonFrame.Visible = false
script.Parent.Visible = false
end
end)
Sure.MouseButton1Click:Connect(function()
game.StarterGui.QuestGui.NoQ:Destroy() <-------------- This is the code
if script.Parent.Parent.Parent.TalkGui.TalkFrame.Dialogue.Text == "Hey kid Can you Do somthing for me?" then
local text = "Well i cant find My radio, last time i saw it I was at this abbandoned place"
local length = string.len(text)
for i = 1, length do
script.Parent.Parent.Parent.TalkGui.TalkFrame.Dialogue.Text = text:sub(1, i)
wait(0.04)
end
wait(0.5)
script.Parent.Parent.Parent.ButtonGui.ButtonFrame.Visible = false
script.Parent.Visible = false
end
end)
first I tried making a local Script then i tried doing it without the local script.

5 comments
I wil Try that out and thanks
I got this In my output "QuestGui is not a valid member of PlayerGui "Players.IOwnRobloxP.PlayerGui". and The Gui didint destroy. What should I do?
That will usually mean that you do not have the GuestGui present in the PlayerGui. Make sure that it's present in the StarterGui so it can replicate to the PlayerGui.
I fixed it By doing this game.Players.LocalPlayer.PlayerGui.QuestGui.NoQ:Destroy() And Thank You very Much :)
No problem :) I would appreciate it when you accept my answer