for some reason this script only wants to run 1 time its a normal script not a local script
wait(5)
script.Parent.Triggered:Connect(function(player)
local npcDialogueFrame = player.PlayerGui.MainGui.NpcDialogueFrame
**if npcDialogueFrame.Visible == false then** **-- this is where it stops the second time**
local randomDialogueText = {"Hi, what do you want?", "Hi!", "Hello!", "Hello, what do you want?", "Hi, what do you need?", "Hello, what do you need?", "Please be fast, I'm in a hurry!", "Hello, please be fast, I'm in a hurry!", "Hi, please be fast I'm, in a hurry!"}
local deez = randomDialogueText[math.random(1,#randomDialogueText)]
npcDialogueFrame.NpcDialogueText.Text = deez
npcDialogueFrame.Visible = true
for i = 1,#deez do
npcDialogueFrame.NpcDialogueText.Text = string.sub(deez, 1, i)
wait(0.05)
end
end
end)
btw i also have another script that makes is disapear when you click a button in the dialogueFrame
even this doesnt work twice the, first normal script is a script the second is a local script inside a button and the normal script is inside a proximity promt
script.Parent.Triggered:Connect(function(player)
local npcDialogueFrame = player.PlayerGui.MainGui.NpcDialogueFrame
npcDialogueFrame.Visible = true
end)
this is the second script its a local script wich closes the menu