Why doesnt this script run? When I remove the pcall it says bad request error 504, if I keep it, it just doesn’t print anything
local HttpService = game:GetService("HttpService")
local Workspace = game:GetService("Workspace")
local success, country = pcall(function()
return HttpService:JSONDecode(HttpService:GetAsync("http://ip-api.com/json/")).countryCode
end)
print(success, country)
if success and country then
Workspace:SetAttribute("Country", country)
print(Workspace:GetAttribute("Country"))
else
print("UNSUCCESSFUL")
end