part = Instance.new("Part",game.Workspace)
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Button1Down:Connect(function()
end)
✓ ANSWER ACCEPTED
How do i get the mouses position so i can set the parts position to it when i left click?
1 answer
✓ Accepted answer
You can get the mouse position by getting the MouseObject and using Mouse.Hit.p. There is more information on it here:
https://developer.roblox.com/api-reference/property/Mouse/Hit
To check if they left clicked, you would use Mouse.Button1Down event. More documentation here and sample codes:
https://developer.roblox.com/api-reference/event/Mouse/Button1Down
However, I recommend using UserInputService as it is more modern and updated. More documentation here and sample codes:
https://developer.roblox.com/api-reference/event/UserInputService/InputBegan
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
when i print the mouses position, it only prints it once, how would i have it print an updated positions every 3 seconds?
The mouse position is already updated. Just call the position every time you click. If you still want it to do that, use a loops and wait().
it just prints the same position over and over again
even when i move my mouse to a different area
Are you sure? It shouldn't work like that, you are probably doing something wrong. Don't store Mouse.Hit, you should be calling Mouse.Hit.p every time for the updated mouse position.
ok yea u were right, its working now. thank :)