Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How would I create a notification system that stacks?

Asked by 14 days ago
Edited 14 days ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

As of now my current notification system is made visible, with a given text and then made invisible assuming the notification has not been triggered again. However, problems arise when two notifications appear within a second apart, meaning the first notification can only be seen for a second. Below is the code:

local notifID = 0
local notifGui = fullScreen.Frame.Notification
local function notifyPlr(Msg)
    spawn(function()
        notifGui.Size = UDim2.new(0,0,0,0)
        notifGui.Visible = true
        notifGui.TextLabel.Text = Msg
        notifID = notifID + 1
        local currentID = notifID
        notifGui:TweenSize(UDim2.new(0.35,0,0.175,0),"Out","Elastic",0.3,true)
        wait(3)
        if currentID == notifID then
            notifGui:TweenSize(UDim2.new(0,0,0,0),"In","Back",0.3,true)
            wait(0.3)
            if currentID == notifID then
                notifGui.Visible = false
            end
        end
    end)
end

The checking of IDs compared to current IDs is so that the notification isn't made invisible from a previous notification.

I wish to make a system where the notifications stack on top of each other, with at least 4 slots, but I have no clue where to begin, how would the notification know when to move up, or disappear etc. Thanks

0
A basic way to create a stacked notification system is to use a variable that will hold the last notification's position. Then from there, each new notification should add the variable to the new notification's position. Asentis 17 — 14d

Answer this question