How to see what objects are touching a specific part at a specific time

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?

a function to see what parts are currently touching a specific part/model (either works) and return said parts, i want this function to be able to return multiple parts, and be used anytime.

  1. What is the issue?

using .touched i can only see what part is touching it ONCE (specifically when whatever its touching is updated), whereas i want to be able to do something like

print(object:GetTouching)

and have the output return something like

[baseplate, Indestructable_Tank.LeftFoot]
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have, and ive asked the assitant which seems to only want to use
object.touched:connect
ive also looked online and fond nothing.

Any info on how to make such a function would be great thanks!

Use the getpartsinbound method. It returns a table that include all the parts that were inside the part you used getpartsinbound on. You can put this all in a function and make it return the table

try using GetPartsInPart like this

print(workspace:GetPartsInPart(object))

Thank you! i searched high and low for a built in method and couldn’t find it.

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