I have a list of pets(each of them Frame).
I want - When I click on a pet, the color of the picture changes to red. But i get an error when i try to make - It is like this:
while true do
local pets = game:GetService("CoreGui")["Pet Index"].PetIndex.Container.ScrollingFrame.Pets:GetChildren()
for _,pet in ipairs(pets) do
if pet:IsA("Frame") then
pet.MouseButton1Click:Connect(function()
pet.Toggle.PetIcon.ImageColor3 = Color3.new(170, 0, 0)
end)
end
end
wait(0.3)
end
Still need little bit help
It’s stuck on change color(If i print i all time got white)
local remove
while true do
local pets = game:GetService("CoreGui")["Pet Index"].PetIndex.Container.ScrollingFrame.Pets:GetChildren()
for _,pet in ipairs(pets) do
if pet:IsA("Frame") then
pet.Toggle.MouseButton1Click:Connect(function()
if remove == true then
pet.Toggle.PetIcon.ImageColor3 = Color3.new(170, 0, 0)
remove = false
else
remove = true
pet.Toggle.PetIcon.ImageColor3 = Color3.new(255, 255, 255)
end
end)
end
end
wait(0.3)
end
I wanna of i press on pet - pet makes Red (img) = that means i Choose this pet for auto Delete. If I press on Red pet - im remove from Delete list. But i dont need help with list, only with change color correctly. (its spam few times and dont work correctly)