Like how do I get the mouses position on a block for say not on the screen but in real space? I have no clue how to go about doing this so I was hoping I could get some help. Also how would I move the arms to a different position on the body say move them back while still keeping them jointed?
Mouse and PlayerMouse objects have a Hit
property which is a CFrame. The rotation doesn't mean anything.
This is the position where the mouse is hovering.
Mouse objects can be obtained usin the (GetMouse)[http://wiki.roblox.com/index.php?title=API:Class/Player/GetMouse] method on a LocalPlayer (from a LocalScript only) or from the events Equipped
or Selected
of the respective Tool and Hopperbin objects.
Mouse objects, while active, get their values (like Hit
and Target
) updated constantly, not just the moment the event occurs.
Consequently using either the MouseMoved
event of the mouse or a simple while
loop can track the motion of the arm.
Note that MouseMoved
only fires when the mouse itself moves across the screen, and so the object the mouse is pointing at may move and not fire the event.