I am trying to add a notification system with a queue. The queue works fine, however the issue is that the clear queue button does not clear the queue.
Any help?
I can’t find any solutions…
-- Define tables
local queue = {}
-- Define tween variables
local Notification = script.Parent.Notification
-- Runs when remote event is fired
game.ReplicatedStorage.Notify.OnClientEvent:Connect(function(TitleText, DescriptionText, interval, delaytime)
-- Clone notification and set text
local NewNotification = Notification:Clone()
local ClearQueue = NewNotification.ClearQueue
table.insert(queue, NewNotification)
NewNotification.Title.Text = TitleText
NewNotification.Description.Text = DescriptionText
NewNotification.Parent = Notification.Parent
ClearQueue.Activated:Connect(function()
table.clear()
end)
Most of the code to make the notification work is not included, as that isn’t important and is functioning fine