Give us more control over OverlapParams

Currently, utilizing GetPartsInPart with OverlapParams lacks sufficient granularity, specifically in filtering Parts based on certain properties like CanQuery. This limitation is hindering development, especially for custom .Touched and .TouchEnded detection systems.

Problem Statement

At present, it’s challenging to exclusively select Parts with CanQuery enabled using OverlapParams. This lack of control complicates efforts to implement precise interaction systems, particularly in scenarios involving Player.Character body parts.

Proposed Solution

Introduce enhanced functionality to OverlapParams that allows developers to specify which Part properties should be considered when retrieving Parts. For instance:

  • Case 1: Retrieve only parts with CanQuery = true.
  • Case 2: Retrieve parts with CanCollide = true and CanTouch = true only.

Use Case

I require a robust solution for custom .Touched and .TouchEnded detection, specifically for detecting interactions with Player.Character body parts such as UpperTorso and LowerTorso. These parts inherently possess CanCollide = true and cannot be altered, complicating the detection process. The current workaround involves detecting movements of Player.Character’s HumanoidRootPart within other Parts, which yields accurate but less efficient results due to unavoidable detection of UpperTorso and LowerTorso.

Additional Context

Enhancing OverlapParams to support selective property filtering would significantly improve the precision and efficiency of interaction detection systems within Roblox games. This feature would empower developers to create more immersive and responsive gameplay experiences without the current constraints.

This enhancement would greatly benefit developers aiming to implement sophisticated interaction mechanics within Roblox, enhancing both gameplay quality and developer productivity.

	task.delay(2, function()
		for _, descendant: Instance in character:GetDescendants() do
			if descendant:IsA("BasePart") then
				local basepart: BasePart = descendant

				basepart.Material = Enum.Material.SmoothPlastic
				basepart.CastShadow = false
				basepart.Massless = true
				basepart.CanCollide = if basepart.Name == "HumanoidRootPart" then true else false
				basepart.CanTouch = basepart.CanCollide
				basepart.CanQuery = basepart.CanTouch

				-- print(basepart, basepart.CanCollide, basepart.CanTouch, basepart.CanQuery)


I have to use this in my code to ensure that UpperTorso.CanCollide is set to false because for some reason it becomes true again by some magical hidden entity I’m unable to find, using a delay ensures that it doesn’t get overwritten

That’s due to the Humanoid most likely

1 Like