Hey, i wanted to know how i could grab mouse position via UserInputService or ContextAction, the only way i knew that i could do that was Getmouse, but now its pretty much gone...
✓ ANSWER ACCEPTED
How do i get mouse's position in 2d Plan?
2 answers
✓ Accepted answer
close enough to what your looking for
local UserInputService = game:GetService("UserInputService")
local button = UserInputService:IsKeyDown(Enum.KeyCode.button here)
if button then
local mouse = game.Players.LocalPlayer:GetMouse()
print(mouse.hit.p)
end)
i believe this will work and it will print the position of the mouse when u press the key u want dont understand how it would work in 2d though since roblox is a 3d game
link to userinputservice here https://developer.roblox.com/api-reference/function/UserInputService/IsKeyDown
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
How is GetMouse gone?
i meant its getting deprecated, isn't it?