hi i made index system but when i test the index there is error.
here is the error:
and the script:
while wait() do
for _,v in pairs(script.Parent.Index.PetsEggs:FindFirstAncestorWhichIsA("Frame"):GetChildren()) do
if player:WaitForChild("Discovered"):FindFirstChild(v.Name) and v:IsA("ViewportFrame") then
v:FindFirstChild(player:WaitForChild("Discovered"):FindFirstChild(v.Name)).ImageColor3 = Color3.fromRGB(255, 255, 255)
else
v:FindFirstChild(player:WaitForChild("Discovered"):FindFirstChild(v.Name)).ImageColor3 = Color3.fromRGB(0, 0, 0)
end
end
end
while wait() do
for _,v in pairs(script.Parent.Index.PetsEggs:FindFirstAncestorWhichIsA("Frame"):GetChildren()) do
if player:WaitForChild("Discovered"):FindFirstChild(v.Name) and v:IsA("ViewportFrame") then
v:FindFirstChild(player:WaitForChild("Discovered"):FindFirstChild(v)).ImageColor3 = Color3.fromRGB(255, 255, 255)
else
v:FindFirstChild(player:WaitForChild("Discovered"):FindFirstChild(v)).ImageColor3 = Color3.fromRGB(0, 0, 0)
end
end
end