I’m trying to make a script that, when the player joins, loads their saved avatars (so Characters->Creations in the Avatar menu). The problem is that when I run the script, I get the error: “HttpService is not allowed to access ROBLOX resources”.
Is there anything I can do about this?
Admittedly, the code I’m using is from another thread (with some small changes):
local http = game:GetService("HttpService")
local usrid=0
game.Players.PlayerAdded:Connect(function(plr)
usrid = plr.UserId
end)
local url = "https://roblox.com/v1/users/"..usrid.."/outfits"
local request = http:GetAsync(url)
local decoded = http:JSONDecode(request)
if not decoded.data then
return warn('Unable to get outfits')
end
if decoded.data then
print(decoded.data)
end