Hello DevForum, I’m gonna get straight to the point. I’m trying to make it so when you collect an emerald it highlights an image of the emerald. but it will not do that.
local player = game.Players.LocalPlayer
local list = game.ReplicatedStorage:FindFirstChild("ChaosEmeralds")
local collectedFolder = player.CollectedEmeralds
function highlightImage(emerald)
game.Players.LocalPlayer.PlayerGui:FindFirstChild("emeralds"):FindFirstChild("main"):FindFirstChild(emerald).ImageColor3 = Color3.new(1, 1, 1)
end
for i, emerald in pairs(list:GetChildren()) do
if collectedFolder:FindFirstChild(emerald.Name) then
highlightImage(emerald.Name)
end
end
basically its scanning the folder that has the collected emerald values.
if you need more details ask.