Roblox GuidebookKnowledge base
English ⌄

Studio / ROBLOX

Touched not firing in Roblox Studio: CanTouch, movement, and handler checks

Separate script startup, physical contact, and the result of your game function. A small TouchProbe sensor, property checks, two diagrams, and an observation log help locate the failing stage without changing the whole map.

Updated:

Define the observation and make a separate sensor #

When a character steps onto a platform but a door stays closed, you do not yet know which stage failed. Contact might not have produced an event, the handler might have returned before the desired action, or the door might have changed in a different scene instance. Record the expected action separately from the visible result. Start with a small practice scene containing a floor and one ordinary part called TouchProbe. Make it visible and reachable by normal character movement, keep the sensor anchored, and set CanTouch to true before testing. Do not change every part in the working game.

Imagine a fictional bridge station: a player crosses a blue pad, and the developer expects an Output message. The first objective is to record the other part's identity, not to open the bridge. Later you can compare the same route with and without the game function. Write down the selected Explorer object and diagnostic Script location. Preserve a separate working-project copy before experimenting, and keep purchases, rewards, and progress saving outside this exercise. This is a proposed scene for your own investigation; it was not run in Roblox Studio for this article. An expected observation is not a test report about your published game.

Check the object, connection, and first marker #

Touched belongs to BasePart. An ordinary part is suitable; a Model container is not a substitute for the relevant physical part. Select TouchProbe and place the diagnostic server Script directly inside it in Workspace. The example checks its parent type, connects a handler, and then prints TouchProbe ready. It deliberately grants nothing and controls no door. If the ready marker is absent, inspect earlier Output errors and the script's execution location first. Waiting for contact cannot confirm a connection that never succeeded. Also check whether you are reading the server's messages rather than a client-only view.

After TouchProbe ready, the next useful marker is TouchProbe hit followed by the other part's path. The otherPart argument represents a physical object involved in contact, not an already identified Player. In this practice scene it might be a character part. Multiple ready messages for one sensor suggest checking for duplicate Script instances or connections. Missing startup output and missing contact output are different symptoms. Preserve that distinction in your notes: script did not start, handler connected without a registered contact, or contact registered but the later action did not happen. Each observation points to a different next check.

local sensor = script.Parent
assert(sensor:IsA("BasePart"), "Put this Script inside TouchProbe")

sensor.Touched:Connect(function(otherPart)
    print("TouchProbe hit", otherPart:GetFullName())
end)

print("TouchProbe ready", sensor:GetFullName())

Distinguish CanTouch, CanCollide, and CanQuery #

CanTouch controls touch events and needs to be enabled on both parts in the relevant pair. Inspect the sensor and the actual approaching object, rather than only the model's visible outer shell. CanCollide governs physical obstruction; disabling collision alone does not mean Touched is disabled. Passing through a sensor can therefore be intentional. CanQuery concerns spatial queries and is not a universal event switch. Setting all three properties to true at once makes the experiment less useful because several conditions change together. Choose one comparison that answers a specific question about the event you are investigating.

There is a separate CanTouch connection detail: connecting while it is false produces an error, and changing it to false after connection disconnects the event. Returning the checkbox to true therefore does not demonstrate that the old handler is connected again. For a clean practice comparison, establish the intended properties before starting a fresh test session and confirm the ready marker. Do not manually delete internal touch objects in an attempt to repair the subscription. Compare two records with one changed condition, explaining what they actually establish. A broad property cleanup of the working map should remain a separate, deliberately planned task.

Three diagnostic stages: Script connected, physical contact recorded, and game result confirmed separately.Open full-size image ↗
Three diagnostic stages: Script connected, physical contact recorded, and game result confirmed separately.

Separate physical movement from an existing overlap #

Roblox documents Touched as a physical-movement event. Placing objects inside each other by assigning Position or CFrame is not equivalent. At least one participating part must be unanchored; two Anchored objects do not create this physical contact with each other. An anchored sensor can still be used with a moving character. You do not need to unanchor every platform in the level. First identify how the apparent contact occurred: a character walked through an area, an object fell onto the sensor, or code directly placed a model into an overlapping position.

For the imaginary station, record three separate scenarios: ordinary character movement, two anchored practice blocks, and an object placed inside by CFrame. These compare conditions; they are not three mandatory repair steps. If your mechanic needs to find objects already occupying a volume, investigate a spatial query such as GetPartsInPart and its parameters as a different detection approach. That replacement needs its own checks. Adding a query does not retroactively produce an earlier Touched event. Do not treat every visible overlap as proof that the particular event your handler expects should already have been delivered.

Different contact conditions: moving character, two anchored objects, and placement through CFrame. Proposed comparisons, not executed tests.Open full-size image ↗
Different contact conditions: moving character, two anchored objects, and placement through CFrame. Proposed comparisons, not executed tests.

Inspect collision groups and repeated messages #

If the project uses collision groups, inspect both actual parts and Workspace.TouchesUseCollisionGroups. When group-aware touch handling is enabled, the relationships between groups affect contacts too. Do not disable groups throughout a project to investigate one pad. Compare the small practice sensor with the real station and write down the differences in conditions. Visually similar models can contain different parts and properties. Our collision-groups guide covers the matrix separately. Here the important step is preserving the condition that distinguishes a simple practice scene from the real object, rather than assuming the two have identical physics settings.

Several TouchProbe hit messages do not necessarily mean several players or repeated Script startup. Multi-part models and small physical movements can produce repeated events. Read the actual otherPart paths that were printed. A foot, hand, and another part of one character are not automatically three completed station visits. A game function must separately identify the character, validate the intended action, and check its required state. Repeated signals and repeated result grants are different problems. A single shared cooldown may also block a second player, so choose the repetition rule for the specific mechanic rather than adding an unexplained universal timer.

Confirm the stage and restore the game function #

Write a short report containing the TouchProbe location, whether readiness appeared, how contact was produced, which otherPart objects arrived, and what happened after the handler. If TouchProbe hit exists, move the investigation to the door-opening function rather than randomly switching physics properties. Restore one piece of game logic and inspect it separately. For the bridge station, distinguish contact recorded, character identified, passage condition accepted, and bridge changed. Each statement needs its own observable evidence. The first statement alone does not establish that the last action completed, even when the player visibly reached the platform.

Finish the small comparison without purchases or rewards, stop the test session, and remove diagnostic messages from the working version according to your own release plan. Do not leave unlimited contact printing across a large level simply to keep watching it. Preserve the cause, inspected change, and repeat-check case so another contributor can reproduce the reasoning. The Script is an original teaching fragment and was not executed in the Roblox engine. The table and diagrams guide the next investigation step; they do not promise the same repair for every object, network condition, or game system that uses contact detection.

ObservationStage identifiedNext check
No TouchProbe readyStartup and connectionFirst Output error and Script location
Ready but no hitWaiting for physical contactCanTouch pair and movement
Two Anchored objectsPhysical contact conditionsCompare a separate scenario
Placed through CFrameOverlap is not an eventDoes the mechanic need a spatial query?
Several hit messagesParts and repeated signalsotherPart paths and action rule
Hit but door stays closedContact already registeredFilter, state and door function

Original sources

Roblox Creator Hub — Collisions
Roblox Creator Hub — BasePart: Touched and CanTouch
Roblox creator-docs — BasePart source: CanTouch connection lifecycle
Roblox Creator Hub — Workspace: TouchesUseCollisionGroups
Roblox Creator Hub — WorldRoot: GetPartsInPart
Roblox Creator Hub — Events and connections