Im confused il try doing it now, wait where would createresultbutton be located exactly?
Players.danodanya12Beta21.PlayerGui.MainChrome.Searched.TextBox.LocalScript:15: attempt to call a Instance value
local PlayerService = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local LocalPlayer = PlayerService.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild('PlayerGui')
local Websites = ReplicatedStorage:WaitForChild('Websites')
local TextBox = script.Parent
local scroll = script.Parent.Parent.ScrollingFrame
function search(query: string)
-- search the database for items that match the query
local results = Websites(query)
-- clear the scrolling frame
scroll:ClearAllChildren()
-- display the search results in the scrolling frame
for _, item in pairs(results) do
local button = scroll(item)
script:AddChild(button)
end
end
TextBox.Changed:Connect(function()
local query = TextBox.Text
search(query)
end)
dude u never listen are you not listening i SAID it searches in replicatedstorge there folder called websites and people can search websites I made and not REAL SEARCH ENGINE
I made a search engine in roblox a while back while making a work around for Hyperlinks aswell (not allowed in roblox anyways but still cool since everyone doubted).
Here I used an API I found on rapid API’s to actually search and get the search results then displayed them onto the GUI (the exact API I used is in one of the later replies on the hyperlinks topic).
EDIT: Just saw you wanted to search ReplicatedStorage, not the web. Misleading title, anyways I’ll leave this reply just because
WOW LOOK AT THIS GUY You didn’t even take one look at the script u didn’t even read everything please stop and listen I’m not going to make a real search engine but a search engine that clones from the replicated storage with a frame that puts it into the main GUI but I don’t know and you don’t read everything please listen and read carefully when talking!
Hi !
A few time ago I made this script to search children of a list so I think that might help you, here the code (you’ll need to modify it a bit) :
local SearchBar = script.Parent.TextBox
local ServerList = script.Parent.Parent.GlobalServerList
SearchBar.Changed:Connect(function()
local Search = string.gsub(string.lower(SearchBar.Text), " ", "")
for Value, Child in pairs(ServerList:GetChildren()) do
if Child:IsA("GuiButton") then
if Search ~= "" then
local Server = string.gsub(string.gsub(string.lower(Child:FindFirstChildWhichIsA("TextLabel").Text), " ", ""), "/", "")
if string.find(Server, Search) then
Child.Visible = true
else
Child.Visible = false
end
else
Child.Visible = true
end
end
end
end)
This a property of gui, you need to set the property visibility of all of them to false and when they search up do wath you want and show what they searched by set there visibility property to true, and I send you a script before !
You need a giant table of fake websites and then you would use something like string.find and loop through the tables contents to find the context you’re looking for