any help is much appreciated🤟
im using this >> External Catalog Queries | Roblox Creator Documentation
it says “table expected, got string” in da output. im not sure whats wrong with the url
local url = "https://search.roproxy.com/catalog/json?CatalogContext=2&Category=9&SortType=0&Keyword="..Text -- the Text is the inputed text in a textbox sent over from the local script through a remote event
local result = httpservice:GetAsync(url)
the whole script just in case anyone wants to see it for future reference >>
local event = game.ReplicatedStorage.RemoteEvents.UpdateSearch
local httpservice = game:GetService("HttpService")
event.OnServerEvent:Connect(function(player,Text) -- the inputed text from the textbox sent over through a remote event
print(Text) -- just for testing
local musicgui = player.PlayerGui.PopUps.Phone.Screen.Music
local url = "https://search.roproxy.com/catalog/json?CatalogContext=2&Category=9&SortType=0&Keyword="..Text -- url but instead of https://search.roblox.com/catalog/json?... its https://search.roproxy.com/catalog/json? because you cant use https service directly with the roblox catalog
local result = httpservice:GetAsync(url) -- get the returned table
for _,song in ipairs(result) do
print(song.Name)
local banner = game.ReplicatedStorage.BearChat.Song:Clone() -- the banner is the frame that is cloned into the scrolling frame
banner.Parent = musicgui.SearchQuery
banner.Id.Value = song.AssetId
banner.Artist.Text = song.Creator
banner.Title.Text = song.Name
end
end)