Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to get mouse without using a tool

Is it possible to find a mouses position without a tool? I know with a tool you can do mouse.hit.p or mouse.Target

1 comment

0

You need to title your question appropriately. "Mouse" is not a question. "How do I get the mouse without using a tool?" is a question, and that should be the title.

1 answer

✓ Accepted answer

The Player object has a GetMouse method, which returns the PlayerMouse. However, you can only use this in a Local Script.

To answer your question specifically, the following code can be used:

local mouse = game.Players.LocalPlayer:GetMouse()

local position = mouse.hit.p

This discussion is preserved as it was. New answers, comments, and votes are closed.