Categories > Coding > Lua >
[HELP] Can't Get this folder
Posted
There is this folder called "Particles/Ignore" and whenever i try to FindFirstChild it i get the error "Particles is not a valid member of Workspace".
How do i get it to find the entire thing and not just try to find "Particles"?
Replied
findfirstchild doesnt throw errors, it either returns the object or nil, im not sure how you got the error but what you can try is a for loop like so:
for _, Obj in next, Workspace:GetChildren() do
if Obj.Name == "Particles/Ignore" and Obj:IsA("Folder") then -- // checks name & classname
-- // do whatever, "Obj" being your "Particles/Ignore" folder
end
end
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post