so if you have a folder that contains 2 decals with same name, and you want to search decal number one and not number two with :GetFullName().
My problem is when you use GetFullName() it will print/retun the name so using :FindFirstChild() or :WaitForChild() isn’t effective, because it will randomly choose the decak because it has the same name
Instance | Documentation - Roblox Creator Hub GetFullName is not going to help you differentiate between 2 decals with the same name. I would either save the actual instance, or save the ID. You can then loop over the decals and find the one with the same ID if you must get the instance from the ID.
so, there was a folder in workspace, and that folder have 2 decals, i want to get specific decals with the same name in that folder, and sorry Decal is only an example
It’s hard to understand what you actually want to do. If you do :GetFullName(), that implies you already know what it is that you wanted, because you ran that method call on the instance itself.
appreciate all your help, i will show you what i mean
in the folder you can see, it got 2 decals with the same name,
so using :GetFullName() and this script is not effective because it will returning random decal
function module.SearchInstance(Path:string)
local stringsplit = string.split(Path,'.')
local direc = nil
for _, keep in ipairs(stringsplit) do
if not direc then
direc = game:FindFirstChild(keep)
else
direc = direc:FindFirstChild(keep)
end
end
return direc
end
i hope this can make an image to how my problem was