i have made a few of these posts, just wanted to know how i would do this. i have tried looping but it equips all pets so i did it this way instead. this is my biggest problem.
function UpdateEquippedp()
local hasran = false
local Pet1 = plr.PetEquipped1.Value
if Pet1 ~= "" then
local button = script.Parent.PetInventoryFrame.Frame.innerFrame.PetButtonHolder:FindFirstChild(Pet1)
button.Equipped.Value = true
button.UIStroke.Color = Color3.fromRGB(80, 255, 61)
button.TickIcon.Visible = true
button.SelectionOrder = 1
end
local Pet2 = plr.PetEquipped2.Value
if Pet2 ~= "" then
local button1 = script.Parent.PetInventoryFrame.Frame.innerFrame.PetButtonHolder:FindFirstChild(Pet2)
button1.Equipped.Value = true
button1.UIStroke.Color = Color3.fromRGB(80, 255, 61)
button1.TickIcon.Visible = true
button1.SelectionOrder = 1
end
local Pet3 = plr.PetEquipped3.Value
if Pet3 ~= "" then
local button2 = script.Parent.PetInventoryFrame.Frame.innerFrame.PetButtonHolder:FindFirstChild(Pet3)
button2.Equipped.Value = true
button2.UIStroke.Color = Color3.fromRGB(80, 255, 61)
button2.TickIcon.Visible = true
button2.SelectionOrder = 1
end
end
UpdateEquippedp()
the code above is the code that changed the appearance.
the video shows the issue.