I want to have a kill feed that lowers all the previous feeds down, so the newest feed is at the top. I don’t want to use UIListLayout tho, as I want tweening to be done.
local CurrentFeed = {}
--// Update feed position
local function UpdatePositions()
for index, feed in pairs(CurrentFeed) do
local Offset = feed.Size.Y.Offset * (tonumber(feed.Name) - 1)
feed.Position = UDim2.new(0.5, 0, 0, Offset)
end
end
--// Create new feed
local function CreateNewFeed(killer, weapon, death)
local NewFeed = Template:Clone()
-- Insert NewFeed into CurrentFeed
table.insert(CurrentFeed, NewFeed)
-- Set NewFeed properties
NewFeed.Size = UDim2.new(1, 0, 0, ScreenSize)
NewFeed.Name = #CurrentFeed
Frame.Size = UDim2.new(0.25, 0, 0, #CurrentFeed * ScreenSize)
NewFeed.Parent = Frame
UpdatePositions()
end
Is what I have, but that seems to lower them in order from 1-5. So the first frame that’s created stays at the top, and each subsequent frame is just lowered.