CanQuery Forgotten For ClickDetectors In Models/Folders

PC Info: Windows 10
Date First Experienced: 01/18/2024 9:42 AM
Date Last Experienced: Current

Video Showcasing This Issue:

Brief Explanation

When putting a ClickDetector inside of a Model/Folder and turning CanCollide off inside of any of the parts present inside, and then making that part transparent, ClickDetector will no longer show up, expected behavior is suppost to be if CanQuery is off, ClickDetector stops showing up, instead of CanCollide.

Reproduction Steps
  1. Open up Roblox Studio And Insert 2 Parts
  2. Group The Parts
  3. Insert ClickDetector Into The Group
  4. Insert A Script Into The Group And Put The Code From The Last Dropdown Into The Script
  5. Turn Off CanCollide For Both (Or One Part) (And Anchor So It Doesn’t Fall)
Place File

CanCollideBug.rbxl (59.9 KB)

Code
local Visible = true

function ChangeVisiblity(Number)
	for _, Part in pairs(script.Parent:GetChildren()) do
		if Part:IsA("BasePart") then
			Part.Transparency = Number
		end
	end
end

script.Parent.ClickDetector.MouseClick:Connect(function()
	if Visible then
		ChangeVisiblity(1)
	else
		ChangeVisiblity(0)
	end
	Visible = not Visible
end)
1 Like

If you want a ClickDetector to be not selectable by the cursor, you can set it to a Collision Group that can’t collide with the Default collision group.

The current behaviour seems intended and changing it might break games

Behavior should be the fact that CanQuery disables ClickDetector, else-wise it shouldn’t. This post was approved by a administrator.

1 Like

It has worked like this since 2017.

Specifically, Transparency > 0.95 non-collidable parts are ignored by ClickDetector / DragDetector unless the ClickDetector / DragDetector is directly underneath the part (LocalTransparencyModifier is not taken into account, so the actual visual transparency is not relevant, only the Transparency proprerty)

If you want to understand the behavior, an engineer many years ago tried to make it so you could click ClickDetectors through transparent non-collidable things. They ignored the transparent non-collidable things, but added a special case to still include things with DragDetectors under them. However, they accidentally forgot about the case of a Model/Folder with a DragDetector under it and ignored the intended click targets in that case.

Consider that the intended behavior.

I agree that the behavior is messy and probably not desirable but there’s no way we could change it at this point without breaking a considerable number of experiences so you’ll have to adjust whatever you were doing to work with this behavior.

This is pretty awful, I wish it was fixed beforehand so it wouldn’t have been involved within experiences, wasn’t looking forward to having to add a click detector every individual part for a workaround, wish there was some sort of detector setting that could be changes to both but automatically set to said original behavior so it doesn’t break games.

Unfortunately this is a case where it’s hard to even have a setting, because the filter is used to decide which ClickDetector is supposed to sink the input in the first place: Before you know which ClickDetector is going to be sinking the input you don’t know which ClickDetector’s setting to use during the search.

Is Roblox going to get a rewrite at some point? I feel like its necessary with all the jumble

That is a question beyond the scope of this bug report :slight_smile:

Eh, fair enough I guess, it might tie in due to the unfunctionality I’ve seen within the replies of why nothing is possible to redo, but I’m just salty due to the issue.

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