Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Moving the cursor around when Xbox controller is connected?

Asked by
zblox164 531 Moderation Voter
5 years ago
Edited 5 years ago

The problem

I have started learning to add Xbox compatibility to my games (that are not visible to other players yet) but can't seem to move the cursor around. It locks in the middle of the screen and there is no way to move it. When I tried to, It would proceed to throw errors at me. I used RunService and detected when the player were to move the thumb stick in a direction and tried moving the cursor like this:

local mouse = player:GetMouse()
mouse.X = mouse.X + 1 -- example

What I did not include

I did not write the player variable or the function that detects input because those have nothing to do with the error. I simply tried this code and it gave me the error.

Recap

I am looking at how to move the cursor around once an Xbox controller has been connected as if you were using a PC.

I have tried the code above to attempt this but failed.

Thanks for any help!

Answer this question