Mouse.Target cannot detect player parts

For some reason, Mouse.Target cannot print player parts but instead the part behind them. I have been trying to google the reason for this and I can’t find out why.

Can I see your script? Also if you can provide more context, that will help me better understand.

It’s a really simple script.

Mouse.Move:Connect(function() --when the mouse moves, detect it
	print(Mouse.Target)
end)

(its just a snippet of the code)
It will not print any of the player’s parts, but instead the parts behind the player.

So are you trying to print the names of parts when the mouse clicks on them?

Everytime the mouse moves, the function is ran. It is not important the context. I just want to know why it won’t print player parts.

You may want to use raycasting for this issue.

Mouse.Target cannot get parts inside of the player, it ignores them by default and goes to the next part through them. A solution would be to either use raycasting or duplicate the parts and put them outside of the the player’s model and weld them to the actual parts you want them to represent, I hope this helps.