Roblox Ontouched Function. Connecting a Function The Connect() function can be used when a given function should run every time an event fires This function immediately returns a connection object In the example below we connect a functiononTouched() to a Part in the WorkspaceIf another part collides with myPart the script prints the name of the other part involved in the collision.
Parameters And Events 1 Traps from education.roblox.com
We are adding new WorldRoot (Workspace) APIs for performing spatial queries on BaseParts It’s never been easier to figure out what Parts are within a given box radius or other Part! New Spatial Queries Here are three new functions that can be used Objects WorldRootGetPartBoundsInBox(CFrame cframe Vector3 size OverlapParams overlapParams).