MoveMouse (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Flurite No edit summary |
>JulienDethurens No edit summary |
||
Line 9: | Line 9: | ||
{{clear floats}} | {{clear floats}} | ||
== Example == | |||
This code demonstrates how you could use the MoveMouse method: | |||
<code lua> | <code lua> | ||
local VU = game:GetService( | local VU = game:GetService('VirtualUser') --Using the GetService method on an instanceable service will create one if it does not exist already and it places it in its proper spot. | ||
--Using the GetService method on an instanceable service will create one if it does not exist already and it places it in its | local x, y = 0, 0 --Set some variables for reference | ||
local x, y = 0, 0 | while wait() do -- This will show an accurate example of said method | ||
--Set some variables for reference | VU:MoveMouse(Vector2.new(x,y)) --Move the mouse to the spcified position | ||
while wait() do -- This will show an accurate example of said method | x = x + 0.1 | ||
y = y + 0.1 --Increment the position counter | |||
end | end | ||
</code> | </code> |
Revision as of 01:48, 16 March 2012
Protected:This item is protected. Attempting to use it in a Script or LocalScript will cause an error.
![]() | |
Returns | nil |
Description: | Allows the ability to set where the Pseudo like Mouse for the VirtualUser is located. |
Member of: | VirtualUser |
Example
This code demonstrates how you could use the MoveMouse method:
local VU = game:GetService('VirtualUser') --Using the GetService method on an instanceable service will create one if it does not exist already and it places it in its proper spot.
local x, y = 0, 0 --Set some variables for reference
while wait() do -- This will show an accurate example of said method
VU:MoveMouse(Vector2.new(x,y)) --Move the mouse to the spcified position
x = x + 0.1
y = y + 0.1 --Increment the position counter
end
Limitations
- Currently this method is locked and of no use.