Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to search directory using a string value?

Asked by 4 years ago
Edited 4 years ago
local directory = "Folder.Tool"
local tool= game.ReplicatedStorage.Folder[directory]

I get an error that says, "Folder.Tool is not a valid member of Folder". I get Why I get this error, but is there a way to make something like this work?

The directory looks like this

v ReplicatedStorage v Folder v Folder Tool

Answer this question