I'm making a script that makes that you can place a marker it works but it goes through all the parts and map so it goes out the map
so I want when you press m a marker places here are my local script
local player = game:GetService('Players').LocalPlayer
local mouse = player:GetMouse()
game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(k)
if k == "m" then
local Mouse = game.Players.LocalPlayer:GetMouse()
---other code comes here but nothing with my problem--
part.Position = Vector3.new(Mouse.Hit.x, Mouse.Hit.y, Mouse.Hit.z)
sorry if you don't understand

2 comments
Wait whats m?
m is the key they must press