Im trying to make a script that searches all around the pivot point and tag the objects that has "collectable" scrip in it. How can i make the script search for "Collectable" script in the objects?
If I understood your question, you should be using a for loop. Loop through Workspace and see if it has any children called Collectable. I made a function that will return all collectable items in a table.
local function GetCollectableItems() local items = {} for i,v in pairs(workspace:GetChildren()) do local Collectable = v:FindFirstChild("collectable") if Collectable then table.insert(items, v) end end return items end