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

How do i make a good search system?

Asked by 4 years ago
script.Parent.Changed:Connect(function(Data)
    local Text = script.Parent.Text
    local Options = script.Parent.Parent.Parent.Options:GetChildren()
    for i, v in pairs(Options) do
        if v:IsA("ImageButton") then
                if Text == v.Name then
                for i,f in pairs(Options) do
                if f:IsA("ImageButton") then
                f.Visible = false
                v.Visible = true
                v.Position = UDim2.new(0.045, 0,0.013, 0)
                end
        end
    end
end
end
end)

Made this script but, its bad because u have to search the full name of the button you're trying to search for. Please help Just want to know if there is a way to not have to search for the full name of the button that u want to search for.

Answer this question