So the title explains it all, I’m basically sending 3 requests to a proxy, But of course the second request has to wait for the first request to finish and the third request has to wait for the second request.
Is there a way to get all over that instead send of waiting for each other requests they’d do it at the same time?
My Code: (All Httpservice requests to proxy are on another module but here is the script that gets their data)
local GamepassData = AssetLoaderModule.GamepassesAPI(Player.UserId)
local ShirtsData = AssetLoaderModule.ShirtsAPI(Player.Name)
local TShirtsData = AssetLoaderModule.GetTShirts(Player.Name)
I’m not efficient in threads but I think this could do something?
local function data(Player)
local GamepassData
local ShirtsData
local TShirtsData
task.spawn(function()
GamepassData = AssetLoaderModule.GamepassesAPI(Player.UserId)
end)
task.spawn(function()
ShirtsData = AssetLoaderModule.ShirtsAPI(Player.Name)
end)
task.spawn(function()
TShirtsData = AssetLoaderModule.GetTShirts(Player.Mane)
end)
end