You have to put my code in the other else.
textBox.SH.MouseButton1Click:Connect(function() -- when the text is changed
local text = textBox.Text:lower() -- lowercase search bar text
if text ~= "" then -- if it has text
local buttons = scroll:GetDescendants() -- all of the buttons
for _, button in pairs(buttons) do -- loops through the buttons
if button:IsA("TextButton") then -- if it's a button
local buttonText = button.Text:lower() -- lowercase button text
if string.find(buttonText, text) then -- if search bar text is found in the button's text
local GUI = ReplicatedStorage.Websites:Clone()
GUI.Parent = PlayerGui:WaitForChild("PlayerGui")
else -- otherwise
local GUI = ReplicatedStorage.Websites:FindFirstChild(buttonText)
if (not GUI) then
print('get 404 page')
return
end
GUI.Parent = PlayerGui
end
end
end
else
I already did or wrong
local scroll = script.Parent.Parent.ScrollingFrame -- CHANGE THIS TO YOUR SCROLLING FRAME
local textBox = script.Parent -- CHANGE THIS TO YOUR TEXT BOX
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Player = Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
textBox.SH.MouseButton1Click:Connect(function() -- when the text is changed
local text = textBox.Text:lower() -- lowercase search bar text
if text ~= "" then -- if it has text
local buttons = scroll:GetDescendants() -- all of the buttons
for _, button in pairs(buttons) do -- loops through the buttons
if button:IsA("TextButton") then -- if it's a button
local buttonText = button.Text:lower() -- lowercase button text
if string.find(buttonText, text) then -- if search bar text is found in the button's text
local GUI = ReplicatedStorage.Websites:FindFirstChild(buttonText)
if (not GUI) then
print(“get 404 page” )
return
end
GUI.Parent = PlayerGui
else -- otherwise
end
end
end
else -- if it's empty
local buttons = scroll:GetDescendants() -- all buttons
for _, button in pairs(buttons) do -- loops through buttons
if button:IsA("TextButton") then -- if it's a button
local sus = ReplicatedStorage.Websites.robloxcom:Clone()
sus.Parent = PlayerGui:WaitForChild("PlayerGui")
end
end
end
end)
I edited it again, try it again.
u sure there is a error in print isnt it
print('get 404 page')
why late replies man
didnt work and nothing in output
What do the errors read?
Chars
Try it now, there was a missing parenthesis…
I’m not currently on my computer at the moment.
oh ok but it still doesnt work i had to use
print(`error 404`)
but still broken no output even searching something or roblox doesn’t do anything
Show a screenshot of the code editor.
done or here code
local scroll = script.Parent.Parent.ScrollingFrame -- CHANGE THIS TO YOUR SCROLLING FRAME
local textBox = script.Parent -- CHANGE THIS TO YOUR TEXT BOX
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Player = Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
textBox.SH.MouseButton1Click:Connect(function() -- when the text is changed
local text = textBox.Text:lower() -- lowercase search bar text
if text ~= "" then -- if it has text
local buttons = scroll:GetDescendants() -- all of the buttons
for _, button in pairs(buttons) do -- loops through the buttons
if button:IsA("TextButton") then -- if it's a button
local buttonText = button.Text:lower() -- lowercase button text
if string.find(buttonText, text) then -- if search bar text is found in the button's text
local GUI = ReplicatedStorage.Websites:FindFirstChild(buttonText)
if (not GUI) then
print('get 404 page')
return
end
GUI.Parent = PlayerGui
else -- otherwise
end
end
end
else -- if it's empty
local buttons = scroll:GetDescendants() -- all buttons
for _, button in pairs(buttons) do -- loops through buttons
if button:IsA("TextButton") then -- if it's a button
local sus = ReplicatedStorage.Websites.robloxcom:Clone()
sus.Parent = PlayerGui:WaitForChild("PlayerGui")
end
end
end
end)
local scroll = script.Parent.Parent.ScrollingFrame -- CHANGE THIS TO YOUR SCROLLING FRAME
local textBox = script.Parent -- CHANGE THIS TO YOUR TEXT BOX
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Player = Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
textBox.SH.MouseButton1Click:Connect(function() -- when the text is changed
local text = textBox.Text:lower() -- lowercase search bar text
if text ~= "" then -- if it has text
local buttons = scroll:GetDescendants() -- all of the buttons
for _, button in pairs(buttons) do -- loops through the buttons
if button:IsA("TextButton") then -- if it's a button
local buttonText = button.Text:lower() -- lowercase button text
if string.find(buttonText, text) then -- if search bar text is found in the button's text
local GUI = ReplicatedStorage.Websites:FindFirstChild(buttonText)
if (not GUI) then
print('get 404 page')
return
end
local GUI = GUI:Clone()
GUI.Parent = PlayerGui
else -- otherwise
end
end
end
else -- if it's empty
local buttons = scroll:GetDescendants() -- all buttons
for _, button in pairs(buttons) do -- loops through buttons
if button:IsA("TextButton") then -- if it's a button
local sus = ReplicatedStorage.Websites.robloxcom:Clone()
sus.Parent = PlayerGui:WaitForChild("PlayerGui")
end
end
end
end)
You forgot to clone it, here try this.
double checking … didnt work did i do something wrong I pasted it correctly /:
Send another screenshot…
Characters.
local scroll = script.Parent.Parent.ScrollingFrame -- CHANGE THIS TO YOUR SCROLLING FRAME
local textBox = script.Parent -- CHANGE THIS TO YOUR TEXT BOX
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Player = Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
textBox.SH.MouseButton1Click:Connect(function() -- when the text is changed
local text = textBox.Text:lower() -- lowercase search bar text
if text ~= "" then -- if it has text
local buttons = scroll:GetDescendants() -- all of the buttons
for _, button in pairs(buttons) do -- loops through the buttons
if button:IsA("TextButton") then -- if it's a button
local buttonText = button.Text:lower() -- lowercase button text
if string.find(buttonText, text) then -- if search bar text is found in the button's text
local GUI = ReplicatedStorage.Websites:FindFirstChild(buttonText)
if (not GUI) then
print('get 404 page')
return
end
local GUI = GUI:Clone()
GUI.Parent = PlayerGui
else -- otherwise
end
end
end
else -- if it's empty
local buttons = scroll:GetDescendants() -- all buttons
for _, button in pairs(buttons) do -- loops through buttons
if button:IsA("TextButton") then -- if it's a button
local sus = ReplicatedStorage.Websites.robloxcom:Clone()
sus.Parent = PlayerGui:WaitForChild("PlayerGui")
end
end
end
end)
If you are converting all input text to lowercase, then the website names must also be ok lowercase.
Change your roblox website in your folder to lowercase, and then test it.