I dont know how to for in pair image

I have image in table and i dont know how to set image label in order

i dont remeber how to for loop in pair in table

local vhs = script.Parent.ImageLabel


local StaticImages = {
	'rbxassetid://7472792778';
	'rbxassetid://10757636219';
	'rbxassetid://520992855';
	'rbxassetid://10195656966';
	'rbxassetid://4689700119';
	'rbxassetid://9470950';
	'rbxassetid://3203623798';
	'rbxassetid://2510585515';
}


while true  do
	wait(0.1)
	for i,v in pairs(StaticImages) do
		vhs.Image = v
	end
end
1 Like

You could use ipairs to achieve that.
Watch this video:

(By @5uphi )

ipairs would return you the items in the table with an order.
pairs would return you the items in the table with an undefined order, meaning - randomness.

3 Likes