Hey! so im making a notification system for my game and i wanted to make a notification system pretty much like bedwars on many more games, so the notications move in onto the screen and they’re always on top of each other, pretty much a classic ui style
But i dont know how i would go trough making this
Can anyone help me?
My current script
local module = {}
function module:Notify(plr, msg)
local tweenservice = game:GetService("TweenService")
local plrgui = plr.PlayerGui
local notifcopy = plrgui.mainhud.notiftemplate:Clone()
notifcopy.Parent = plrgui.mainhud.notifs
notifcopy.Visible = true
notifcopy.Name = "Notification"
notifcopy.text.Text = msg
notifcopy.Position = UDim2.new(1.05, 0, 0.938, 0)
local move = tweenservice:Create(notifcopy, TweenInfo.new(0.75, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), {Position = UDim2.new(0.745, 0, 0.938, 0)})
move:Play()
move.Completed:Wait()
task.wait(3.5)
local moveout = tweenservice:Create(notifcopy, TweenInfo.new(0.75, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), {Position = UDim2.new(1.05, 0, 0.938, 0)})
moveout:Play()
moveout.Completed:Wait()
notifcopy:Destroy()
end
return module
1 Like
Your tweeninfo is missing 2 things:
the repeat count and the reverse bool
1 Like
but if works fine witheout these, the only problem i have is making then animate while making the other notifications on the list go up
But if i like remove it from the ui list layout then the other notifications wont go up, and also if i put it on the ui list layout it doesnt animates
try adding a script on every notification.
the script should tween the notification itself everytime you put them into the player’s gui
yeah its a module i made, but the problem is the ui list layout’s positioning makes the tween not work, and i dont know how to get over this
try to set the ui list layout parent to nil and after the tween set it back to the ui element
i already tried that and that makes so the other notifications dont go up
could you please send a screenshot of the gui?
Just put a UIListLayout
inside the plrgui.mainhud.notifs
Frame
Heres a screenshot showing ui list layout properties, the notificaions and the list of instances, the notification have text but these are just clones of the template
well but then the animation wouldnt work
Then make a second frame inside the main notification frame and animate the second one. Make the main one transparent
try setting all the notifications position to a single position after setting the list ui parent’s to nil
but then how would i make one go on top of each other?
zindex is a property that allows you to set the order the ui elements will be displaying.
if one frame’s zindex is equals to 2 then it will show up on top of every ui element with zindex inferior to 2
No i mean like, if one notification appear and theres more the other will go to a position above it so its like a list
I see the problem, the Ui list constraints the position of an ui element so you cannot move it
yeah thats the problem, an example is bedwars, the notifications are always on top of each other and theres the animation
Parent the frame you want to animate to the screengui and animate it from there