So if I try doing this:
local text = script.Parent.Parent.TextBox.Text
script.Parent.MouseButton1Click:Connect(function()
if game.ReplicatedStorage.Maps:WaitForChild(text) == nil then
print("Invalid")
else
print("valid")
end
end)
BUT I keep getting an infinite yield: Infinite yield possible on 'ReplicatedStorage.Maps:WaitForChild("")
How do I make it work without an infinite yield?

2 comments
?
You can't do :WaitForChild on a property.