Just trying to loop through some images for my GUI here. But it gives me this error:
03:05:39.546 Unable to assign property Image. Content expected, got nil - Client - LocalScript:27
cycleImages = {
img1 = "http://www.roblox.com/asset/?id=11112076930",
img2 = "http://www.roblox.com/asset/?id=11112076930",
img3 = "http://www.roblox.com/asset/?id=11112077780",
img4 = "http://www.roblox.com/asset/?id=11112078096",
img5 = "http://www.roblox.com/asset/?id=11112078422",
img6 = "http://www.roblox.com/asset/?id=11112078720",
img7 = "http://www.roblox.com/asset/?id=11112079023",
img8 = "http://www.roblox.com/asset/?id=11112079410",
img9 = "http://www.roblox.com/asset/?id=11112079793",
img10 = "http://www.roblox.com/asset/?id=11112080150"
}
local menu = script.Parent:WaitForChild("BackgroundFrame")
local playButton = menu:WaitForChild("Newgame")
local playButtonBackgroundFrame = menu:WaitForChild("Button1Background")
local isHovering
playButton.MouseEnter:Connect(function()
isHovering = true
playButtonBackgroundFrame.Visible = true
playButton.BackgroundTransparency = 1
while isHovering do
for i = 1,10,1 do
playButtonBackgroundFrame.Image = cycleImages[i] -- Line 27 error
task.wait()
end
task.wait()
end
end)