MoveMouse (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>NXTBoy
New page: <onlyinclude>{{Method |name = MoveMouse |arguments = Vector2 position |description = Allows the ability to set where the Pseudo like Mouse for the V...
 
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
 
(18 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{locked}}
<onlyinclude>{{Method
<onlyinclude>{{Method
|name                = MoveMouse
|name                = MoveMouse
|arguments            = [[Vector2]] position
|arguments            = [[Vector2]] ''position''
|description          = Allows the ability to set where the Pseudo like Mouse for the VirtualUser is located.
|description          = Allows the ability to set where the Pseudo like Mouse for the VirtualUser is located.
|object              = [[Service:VirtualUser|VirtualUser]]
|object              = VirtualUser
|protected            = Yes
|protected            = Yes
}}</onlyinclude>
}}</onlyinclude>


==Example==
{{clear floats}}
<pre>
 
local VU = game:GetService("VirtualUser")
== Example ==
--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.
 
x = 0, y = 0
This code demonstrates how you could use the MoveMouse method:
--Set some variables for reference
 
while wait() do -- This will show an accurate example of said method --
<syntaxhighlight lang="lua">
    VU:MoveMouse(Vector2.new(x,y)) --Move the mouse to the spcified position
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.
    x = x + 0.1
local x, y = 0, 0 --Set some variables for reference
    y = y + 0.1 --Increment the position counter
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
end
</pre>
</syntaxhighlight>


== Limitations ==
== Limitations ==
Currently this method is locked and of no use.
*Currently this method is locked and of no use.
 
[[Category:Methods]]

Latest revision as of 05:01, 27 April 2023

Protected:This item is protected. Attempting to use it in a Script or LocalScript will cause an error.
MoveMouse( Vector2 position )
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.