All mouse target scripts broke?

This did not work, did roblox update or something?

Did not work either, im gonna put a print after the target.name

1 Like

Check if your Mouse.TargetFilter is set. I put the script into my studio and everything is working fine.

Or maybe the part’s name you are wanting to check isn’t named ‘PoogliesDrawer’.

What a mouse.targetfilter???

Okay, so I just tried my script in a new baseplate, and it works. So im gonna try to find what could be causing me not to be able to do it in this specific world. Ill keep you updated.

If you want to get around the TargetFilters you already have, I have a function that you can use

local function MouseHit(Mouse, blacklist)
	local UnitRay = Mouse.UnitRay
	local ray = Ray.new(UnitRay.Origin, UnitRay.Direction*1000)
	
	return workspace:FindPartOnRayWithIgnoreList(ray, blacklist or {})
end

It uses rays and gets the same results as if you did Mouse.Target or Mouse.Hit.Position with the first value it returns being the part it hits.

2 Likes