Hi scripters,
i am making my own quest system that i am almost finished with. Now i just need to do that the quest gui in the quest menu will not duplicate. Now it is duplicating like that you click on the accept button more than 1 time (I know that i could make the accept button dissapear, but i still need to check if the quest was accepted or completed.) Here’s my code:
if questModul.settings[quest]["Completed"] == true or questModul.settings[quest]["Accepted"] == true then
print("Quest already finished or accepted!")
else
questModul.settings[quest]["Accepted"] = true
local questFrame = player:FindFirstChild("PlayerGui").QuestGui.QuestFrame
local questWindow = questFrame:FindFirstChild("Sample"):Clone()
questWindow.Visible = true
questWindow.Parent = questFrame
questWindow.Name = quest
questWindow.QuestName.Text = quest
questWindow.NPCname.Text = questModul.settings[quest]["Npc"]
questWindow.QuestDescription.Text = questModul.settings[quest]["Description"]