DankviskyJoin Date: 2012-03-04 Post Count: 5430 |
Not like change the cursor of the mouse, but put gui at it's position.
~davisky~ |
|
|
|
Or if you're trying to make the GUI appear when you click on the screen make the GUI according to the mouse's X position and the Y position.
http://wiki.roblox.com/index.php?title=API:Class/Mouse |
|
DankviskyJoin Date: 2012-03-04 Post Count: 5430 |
I dont need to do that, i need to put a gui (multiple) at the mouse's position whenever they click a button.
~davisky~ |
|
DankviskyJoin Date: 2012-03-04 Post Count: 5430 |
Oh thanks!
~davisky~ |
|
DankviskyJoin Date: 2012-03-04 Post Count: 5430 |
I know this is ironic. But how to find the mouse? If it on the Gui (PlayerGui).
~davisky~ |
|
DankviskyJoin Date: 2012-03-04 Post Count: 5430 |
nvm, i just somehow forgot to read the 2nd line on the wiki.
~davisky~ |
|
|
you get the mouse game.Players.LocalPlayer:GetMouse()
then do mouse.hit.p
"As a wise man once told me, get out." |
|
DankviskyJoin Date: 2012-03-04 Post Count: 5430 |
It makes it move not to the mouse's position, but to 0,0,0,0 :/
script.Parent.Parent.Parent.MLGImages.Hitmarker.Position = UDim2.new(mouse.Hit.p)
At least it doesnt error and i hope i am doing it right.
~davisky~ |
|
DankviskyJoin Date: 2012-03-04 Post Count: 5430 |
Help pls.
~davisky~ |
|
|
mouse.Hit.p is the Vector3 destination of the mouse in the 3D world. GUIs are obviously 2D.
So, something like this (make sure you define gui)
local player = game.Players.LocalPlayer;
local mouse = player:GetMouse()
game:GetService("RunService").RenderStepped:connect(function()
gui.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
end) |
|
DankviskyJoin Date: 2012-03-04 Post Count: 5430 |
Oh, thanks! :D it worked!
~davisky~ |
|
DankviskyJoin Date: 2012-03-04 Post Count: 5430 |
Btw, anyone knows what is the default cursor texture?
~davisky~ |
|