I’ve been making a game called throwing simulator (link below) https://www.roblox.com/games/6869371095/100-VISITS-Throwing-Simulator
If you got to the shop and buy the first rock then throw it, it always goes to the center of whatever your mouse is on. I want it to just go straight where the mouse position is. I have found another topic on this but it did not answer my question. Which leaves us to my question:
--LocalScript
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local pos = mouse.Hit.Position -- 'hit' is a CFrame
To note - the Hit point will vary depending on any object the mouse is over at the time.
If you wish to ignore this you can use the mouse’ TargetFilter property and set it to the object(s) you wish to ignore.
I can’t really show my code, I am on mobile and my code is on my computer. I do know that position is a vector3. I guess I could have worded the title different, I need it to go to the exact vector3 position as the mouse. Your code is currently what I am doing. Though I have not tried the size offset. You can see the issue in the game when you buy a rock, whatever you click it goes to the center of it.
Your “Goal” is mouseTarget.Position so it is just getting the position (origin) of the part you click on, which is why it goes the center of the part… You should do what @WingItMan said which was mouse.Hit.Position.