I have a problem With a Npc's Gui?
I have a Npc To where once you Click "Sure" he Destroys And i noticed that after he is destroyed The E Gui To talk is still there and if you click it it just re-does the dialogue again. Here is my code
01 | <pre class = "brush: lua" >Local A = Game.Players.LocalPlayer.ScreenGui |
02 | Sure.MouseButton 1 Click:Connect( function () |
05 | if script.Parent.Parent.Parent.TalkGui 1. TalkFrame.Dialogue.Text = = "Hey kid Can you Do somthing for me?" then |
06 | local text = "Well i cant find My radio, last time i saw it I was at this abbandoned place" |
07 | local length = string.len(text) |
11 | script.Parent.Parent.Parent.TalkGui 1. TalkFrame.Dialogue.Text = text:sub( 1 , i) |
17 | script.Parent.Parent.Parent.ButtonGui 1. ButtonFrame.Visible = false |
18 | script.Parent.Visible = false |
19 | game.Players.LocalPlayer.PlayerGui.QuestGui.NoQ:Destroy() |
20 | E.Partee.Transparency = 0 |
21 | E.Partww.Transparency = 0 |
22 | E.Partpp.Transparency = 0 |
24 | A.ButtonGui:Destroy() < |
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
Does anybody have any idea on how to fix this
Thanks