Trying to make like notification system and it is not working!

  1. What do you want to achieve?

I want to achieve a working notification system for my quest system, so basically when a player completes a quest then it a ui that shows completed that works fine! I want it so that if the completed button is visible then a ui shows that shows that you have completed the quest and the you can claim the reward!

  1. What is the issue?

The issue is that it doesn’t work if I make it visible to false!

This script works

while task.wait() do
	local Module = require(game.ReplicatedStorage.Quest)
	local plr = script.Parent.Parent.Parent.Parent.Parent.Parent
	if plr.Quests[script.Parent.Name].Min.Value >=plr.Quests[script.Parent.Name].Max.Value then
		plr.Quests[script.Parent.Name].Min.Value = plr.Quests[script.Parent.Name].Max.Value
		if plr.Quests[script.Parent.Name].Completed.Value == false then
			script.Parent.CompleteButton.Visible = true
			plr.PlayerGui["Screen side buttons"]:WaitForChild("Frame"):WaitForChild("Quests"):WaitForChild("Info").Visible = true
			script.Parent.Bars.TextLabel.Text = "%100"
		else
			script.Parent.CompleteButton.Visible = false
			script.Parent.Bars.TextLabel.Text = "%100"
			script.Parent.Rarity.Text = "Completed!"
			script.Parent.CColor.BackgroundColor3 = game.ReplicatedStorage.Pets.Rarities2.Completed.Color.Value
			script.Parent.Bars.Visible = false
		end
	else
		script.Parent.CompleteButton.Visible = false
	end
end
  1. What solutions have you tried so far?

Finding a solution.

This script doesn’t work!

while task.wait() do
	local Module = require(game.ReplicatedStorage.Quest)
	local plr = script.Parent.Parent.Parent.Parent.Parent.Parent
	if plr.Quests[script.Parent.Name].Min.Value >=plr.Quests[script.Parent.Name].Max.Value then
		plr.Quests[script.Parent.Name].Min.Value = plr.Quests[script.Parent.Name].Max.Value
		if plr.Quests[script.Parent.Name].Completed.Value == false then
			script.Parent.CompleteButton.Visible = true
			plr.PlayerGui["Screen side buttons"]:WaitForChild("Frame"):WaitForChild("Quests"):WaitForChild("Info").Visible = true
			script.Parent.Bars.TextLabel.Text = "%100"
		else
			script.Parent.CompleteButton.Visible = false
			script.Parent.Bars.TextLabel.Text = "%100"
			script.Parent.Rarity.Text = "Completed!"
			script.Parent.CColor.BackgroundColor3 = game.ReplicatedStorage.Pets.Rarities2.Completed.Color.Value
			script.Parent.Bars.Visible = false
		end
	else
		plr.PlayerGui["Screen side buttons"]:WaitForChild("Frame"):WaitForChild("Quests"):WaitForChild("Info").Visible = false
		script.Parent.CompleteButton.Visible = false
	end
end

Thank you in advance!