local function createHighlight(item)
if item:FindFirstChild("Highlight") then
return
end
local highlight = Instance.new("Highlight")
highlight.Adornee = item
highlight.OutlineColor = Color3.new(1, 0, 0)
highlight.OutlineTransparency = 0.5
highlight.FillTransparency = 1
highlight.Parent = item
end
local function checkItems()
local itemsFolder = workspace:FindFirstChild("Items")
if not itemsFolder then return end
for _, child in ipairs(itemsFolder:GetChildren()) do
createHighlight(child)
end
end
local function setupListener()
local itemsFolder = workspace:WaitForChild("Items")
itemsFolder.ChildAdded:Connect(function(child)
wait(0.1)
createHighlight(child)
end)
end
setupListener()
while true do
checkItems()
wait(3)
end
Comments
No comments yet
Be the first to share your thoughts!