still didnt fix /: what is then issue
Alright explain how you want this to play out one more time.
When you type text in a textbox and press the search button, you want the website with that same name to be displayed?
what u mean ??? i am making search engine but I don’t know why its not working correctly
I’m referring to the mechanisms. Like what happens when you push buttons, and how things are to be displayed.
clicked button then displays the word like if the word robloxian it will work or if someone spelled wrong maybe like robox spelled wrong then it finds something with that like ohio location sus
Alright firstly create the search button.
local PlayerService = game:GetServicr(‘Players’)
local ReplicatedStorage = game:GetService(‘ReplicatedStorage’)
local LocalPlayer = PlayerServicr.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild(‘PlayerGui’)
local Websites = ReplicatedStorage:WaitForChild(‘Websites’)
local SearchBoxEvent = function()
local SearchText = YOURSEARCHBOX.Text:lower()
for _, Button in (YOURSCROLLFRAME:GetChildren()) do
local ButtonEvent = function()
local Website = Websites:FindFirstChild(Button.Text)
if (not Website) then
return print(“get 404”)
end;
local Website = Website:Clone()
Website.Visible, Website.Parent = true, PlayerGui
end
SEARCHBUTTON.MouseButton1Click:Connect(SearchBoxEvent)
I’m on mobile and this is untested, so send screenshots of errors and stuff.
ehh i did make the search button textBox.SH.MouseButton1Click:Connect(function()
the SH Is the Search button icon
I know, but I don’t know how you have everything else layed out. So just start step by step.
local SearchBoxEvent = function()
local SearchText = TextBox.Text:lower()
for _, Button in (scroll:GetChildren()) do
local ButtonEvent = function()
local Website = Websites:FindFirstChild(Button.Text)
if (not Website) then
return print('get 404')
end;
local Website = Website:Clone()
Website.Visible, Website.Parent = true, PlayerGui
end
TextBox.SH.MouseButton1Click:Connect(SearchBoxEvent)
the SearchBoxEvent is giving me red error in the script editor
Add an extra “end” after the last one.
And it’s best to provide screenshots.
Players.danodanya12Beta21.PlayerGui.MainChrome.Searched.TextBox.LocalScript:25: Expected ‘end’ (to close ‘function’ at line 12), got ; did you forget to close ‘then’ at line 18? - Studio - LocalScript:25
Create a new line on like 23 and type “end”
didnt work when i clicked the search icon it didn’t work something wrong again?]
when will u come on ur PC
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
local SearchBoxEvent = function()
local SearchText = TextBox.Text:lower()
for _, Button in (scroll:GetChildren()) do
local ButtonEvent = function()
local Website = Websites:FindFirstChild(Button.Text)
if (not Website) then
return print('get 404')
end;
local Website = Website:Clone()
Website.Visible, Website.Parent = true, PlayerGui
end
end
end
TextBox.SH.MouseButton1Click:Connect(SearchBoxEvent)
fixed the first one still not working
Under the second end type this:
Button.MouseButton1Click:Connect(ButtonEvent)
Alright can you send a video of the problem? As I said I don’t know how you have this layer out…