[Python] Pyautogui not properly moving the mouse in Roblox

Discussão em 'Python' iniciado por Stack, Junho 3, 2025.

  1. Stack

    Stack Membro Participativo

    I'm writing code in python to help me accomplish something in a Roblox game. I won't go into too much detail, but basically, the objective is to automatically click at certain points in the screen. To try to accomplish this, I am using pyautogui.click(). So for instance if the point I needed to click at was (300, 500), I'd do pyautogui.click(300, 500)

    Outside of Roblox, pyautogui works just fine. However, whenever I have Roblox open and I use the commands, it doesn't work properly. So, let's say the mouse starts out at (0, 0), and I activate a click at (300, 500). When that happens, the mouse cursor doesn't move, and the click happens at (0, 0) where the mouse originally was. However, as soon as I move my actual mouse even slightly, the mouse cursor teleports back to (300, 500) where it was supposed to be.

    This makes it impossible to do what I want because I want the program to click at certain spots without me having to move my actual, physical mouse. Does anyone know how I can use python to actually move the mouse properly?

    Continue reading...

Compartilhe esta Página