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

Locking the mouse at one point

Asked by 11 years ago

I have a third person camera, and it currently locks the player from zooming in or out, and it also makes the person follow where the mouse is going. What i need now is to make the mouse lock at one position on the screen. How would i start ? Here is the Cam script

01local abs = math.abs
02 
03local distance = 5
04local zoom = 70
05local sensitivity = 0.25
06local height = 1
07 
08local player =  game.Players.LocalPlayer
09local mouse = player:GetMouse()
10local camera = Workspace.CurrentCamera
11 
12while not camera do
13        Workspace.Changed:wait()
14        camera = Workspace.CurrentCamera
15end
View all 66 lines...

1 answer

Log in to vote
0
Answered by
jobro13 980 Moderation Voter
11 years ago

I will give a really short but final answer, as there ain't really other things to say. It is currently impossible to lock your mouse in a position.

However, as what I would consider a very, very hackish method is to equip a tool (this to get the "tool mouse" ) and set the icon to a complete transparant (invisible) image. Now you can use a GUI (or image label) to create a mouse cursor which you can "lock" by not moving the GUI itself around.

Please note that in that case the normal mouse will still work. You will also have to change how the camera works.

In theory this is possible, but I am afraid that this will look really bad in practice.

Ad

Answer this question