Help with making notification system queue?
Ok so im trying to make a notification system that alerts people when ever someone either joins,leaves, or dies. but im having a problem to where when a new notification is received it overwrites the last one.
02 | game.Players.PlayerAdded:connect( function (player) |
03 | game.workspace.PlayerJoined.PlayerName.Value = player.Name |
04 | game.workspace.PlayerJoined:FireAllClients() |
07 | game.Players.PlayerRemoving:connect( function (player) |
08 | game.workspace.PlayerLeft.PlayerName.Value = player.Name |
09 | game.workspace.PlayerLeft:FireAllClients() |
04 | local OPENPOSITION = UDim 2. new( 1 , - 200 , . 75 , 0 ) |
05 | local CLOSEPOSITION = UDim 2. new( 1 , 0 , . 75 , 0 ) |
12 | local Notification = script.Parent.Notification:clone() |
13 | Notification.Name = "Notification1" |
14 | Notification.Parent = script.Parent |
15 | Notification:TweenPosition(OPENPOSITION, "Out" , "Bounce" , . 5 , true ) |
18 | Notification:TweenPosition(CLOSEPOSITION, "Out" , "Bounce" , . 5 , true ) |
20 | elseif Queue = = 1 then |
21 | script.Parent.Notification 1. Position.X = script.Parent.Notification 1. Position.X + UDim 2. new( 0 , 0 , 0 , 55 ) |
22 | local Notification = script.Parent.Notification:clone() |
23 | Notification.Name = "Notification2" |
24 | Notification.Parent = script.Parent |
25 | Notification:TweenPosition(OPENPOSITION, "Out" , "Bounce" , . 5 , true ) |
28 | Notification:TweenPosition(CLOSEPOSITION, "Out" , "Bounce" , . 5 , true ) |
33 | game.workspace.PlayerJoined.OnClientEvent:connect( function () |
34 | script.Parent.Notification.Text = game.workspace.PlayerJoined.PlayerName.Value .. " has joined." |
38 | game.workspace.PlayerLeft.OnClientEvent:connect( function () |
39 | script.Parent.Notification.Text = game.workspace.PlayerLeft.PlayerName.Value .. " has left." |
i want it to where everytime the queue goes up by 1 the previous notifications go up by 55. please help me.