Table only printing out only 1 item when there is Mutiple items

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

  2. What is the issue? The table for days is only printing out one item in the table when there is more then 1

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? I tried to debug this code but I’m still having issues with it

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local Time = script.Parent
local UI = game.Players.LocalPlayer.PlayerGui:WaitForChild("ServerTime")
local TimeofDay = game.Lighting.ClockTime
TimeofDay = game.Lighting.ClockTime/2
local PM_AM = {"AM" ,"PM"}
local Days = {
	"Monday",
	"Tuesday",
	"wednesday",
	"Thrusday",
	"Friday",
	"Saturday",
	"Sunday"}

for i, v in pairs(PM_AM) do
	print(v)
end




for i, d in pairs{Days} do
	print(d)



while true do
	wait()
	if game.Lighting.ClockTime <= 24/2 then
		Time.Text = PM_AM[1]
	else
		if game.Lighting.ClockTime >= 24/2 then
			wait(1)
			Time.Text = PM_AM[2]
		end
	end
end
end


Hello, so i made a time script for my game’s time cycle but the problem is for the days table when i go to print that out it only prints 1 value out why is this happening?

Arrays should use ipairs while pairs is used for dictionaries.
Also use parenthesis like ipairs() not ipairs{}