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
end)
return connection
end
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?