Getting a script from a website not working

I’m having issues with this code:

local data = game:GetService("HttpService"):GetAsync("https://api.beyondrbx.ml/orderly/script.lua")
loadstring(data)

It gives me the output loadstring is not available

Loadstring is enabled in ServerScriptService, Ive tried putting the code inside serverscriptservice but that also doesnt work.

1 Like

loadstring doesn’t work on clients. Make sure this is a server script.

Also, bytecode can’t be loaded either, it has to be source code. (In your case it is source code so you are fine)

1 Like

I just tried using a sever script, it didn’t work.

What does it actually return? Try putting print(data)

maybe try using HttpService:JSondDecode(data)

he is trying to get some code via loadstring(), you’re putting a function for JSON decoding, like it only works for websites that have something like this

{
   "number": 1,
   "string": "hi",
   "boolean": true,
   "table": {
      "metaverse": false
   }
}