mouse.Target targets the camerapart

I have the part that camera CFrame goes on. I want to see if the mouse targets on a part that i need, but when i check the target it targets on the CameraPart. How to fix it?

function judyai.ConnectCamera(currentcamera, camerapart)
	local connection = game:GetService("RunService").RenderStepped:Connect(function()
		currentcamera.CFrame = camerapart.CFrame
	return connection

What if you make the CameraPart CanQuery property false by unchecking it in the Properties?

Nothing. I dont know why. This dont help

What is the script you use to get the mouse target. The script you provided about the camera doesn’t tell us anything.
Are you using the mouse position or a raycast to get the Part the mouse is pointing to?

Mouse has a property called TargetFilter which ignores an instance while raycasting.

Mouse.TargetFilter = cameraPart

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.