Get last three items in a table?

Hello! I am currently trying to make a broadcast system that puts a log on the screen every time something happens. The game stores all the logs in a table, but I want the broadcast to show the last three logs with the latest most visible.

How would I go about getting the last three logs in the table?

2 Likes

You could try something as simple as:

local Recent = Table[#Table]
local Recent2 = Table[#Table - 1]
local Recent3 = Table[#Table - 2]
3 Likes

This worked beautifully! Thank you so much!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.