Hello developers.So i was making a notification service for myself,its working succesfully but the problem is when second or more messages appearing,it wont animate.but the message is animating when appearing as first.
Here’s my module that creates messages.
local Settings = {}
local Players = game:GetService("Players")
local MessageFrame = script.Frame
function Settings.ReleaseNotification(To,Title,Message,Type)
if To ~= nil and typeof(To) == "Instance" then
local UI = To:WaitForChild("PlayerGui").Notification
local Frame = MessageFrame:Clone()
if Title ~= nil then
Frame.Title.Text = Title
else
warn("Başlık bulunamıyor.Mesaj yayınlanamadı.")
return
end
if Message ~= nil then
Frame.Message.Text = Message
else
warn("Mesaj bulunamıyor.Mesaj yayınlanamadı.")
return
end
if Type ~= nil then
if Type == "Standart" then
Frame.UIStroke.Color = Color3.fromRGB(255,255,255)
elseif Type == "Error" then
Frame.UIStroke.Color = Color3.fromRGB(255,0,0)
elseif Type == "Warning" then
Frame.UIStroke.Color = Color3.fromRGB(255,170,0)
elseif Type == "Succesful" then
Frame.UIStroke.Color = Color3.fromRGB(0,255,0)
else
warn("Bilinmeyen bir uyarı tipi gönderildi.Varsayılan (Standart) uygulandı.")
Frame.UIStroke.Color = Color3.fromRGB(255,255,255)
end
else
warn("Tip bulunamıyor.Mesaj yayınlanamadı.")
return
end
Frame.Parent = UI
for i,v in pairs(UI:GetChildren()) do
if i >= 2 then
v.Position = UDim2.new(0.745,0,v.Position.Y.Scale + 0.1,0)
end
end
game:GetService("TweenService"):Create(Frame,TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{Position = UDim2.new(0.745,0,Frame.Position.Y.Scale,0)}):Play()
task.wait(10)
game:GetService("TweenService"):Create(Frame,TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{Position = UDim2.new(1.2,0,Frame.Position.Y.Scale,0)}):Play()
task.wait(0.5)
Frame:Destroy()
else
warn("Oyuncu bulunamıyor.Mesaj yayınlanamadı.")
return
end
end
return Settings
can somebody help me?
please ask me if no understood.i cant write nice enough english im a turkish person.