My API only works in studio not in game

I made an API (In Python) that gets all the pixels on my screen and puts it in-game.

The problem is it only works in studio not in game, I heard you need to host it on a server, or something like that.

I don’t know how to do that.

Here is some of the code:

@app.route("/Stream/", methods=["GET"])
def Stream():
    ScreenShot = pyautogui.screenshot()
    ScreenShot = ScreenShot.resize((288, 180))
    Pixels = ScreenShot.getdata()

    Message = {
        "MousePos" : pyautogui.position(),
        "ScreenPixels" : list(Pixels),
        "ScreenColor" : AverageColor(Pixels),
        "Result" : "Success",
    }
    Json = json.dumps(Message)

    return Json

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=1010)

Note: I am not too sure if putting your screen in Roblox is allowed or not, But I am only making this for learning purposes, I don’t think I will publish this. (I also saw other people making this.)

1 Like

Also I am using the flask library.

I think you need to pay money to host an API.

Yea, But I want to host it on my PC.

I don’t think that is possible.

I saw people make it. So it is possible.

I need help making this API public.

Bump, I need help for this API.

I think I found a way how using ngrok or whatever it was called.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.