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 the position of the mouse?

Im making a script that has a lerp that will of course move the block to your mouse position in the game, but I cant seem to figure out how, If you know please answer! Thanks

EDIT: Spelled answer wrong.

1 answer

✓ Accepted answer

You can index the Hit property of the Player's mouse from a LocalScript.

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

print(mouse.Hit.p) --'.p' to convert from CFrame to Vector3

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