How can i make search engine in roblox

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)

What is searchDatabase & createResultButton because they don’t exist?

Those functions does not exist in ROBLOX.

yeah i’ve changed a bit and its giving me error and this is still not fixed :expressionless:

Well, you’d probably somehow need to connect to a computer or something like that, but the question is if ROBLOX would take down your game.

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

1 Like

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

The guy who put that said it was pseudo code not copy and paste ready

1 Like

You still think this is misleading title look HERE!


That is not the title lol. The title of the post is misleading, I didn’t have the time to go through 70+replies

redeacted
redeacted
redeacted
redeacted

I have a question, are you trying to make it through google’s api?
If yes then please stop, as it could get you and your game banned.

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!

1 Like

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)

Have a nice day !

2 Likes

thats not really what i’ve said i want it to copy what it searched and put it into the GUI from the replicated storage

2 Likes

But why dont put it into player gui ?

1 Like

becuase it will show things they didnt search and I wanna remove the things that isn’t what it searched !

1 Like

Oh ok I see, you need to set the visibility of them to false !

1 Like

i dont know wich script your talking about and how to set the other false if its not what they searched

1 Like

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 !

1 Like

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

1 Like