# Reflective Detector

The example script, *Reflective Detector* (*ReflectiveDetectorExample.cs*), allows you to detect when an avatar collides with an object that contains the script. It sends data to the *Reflective Tracker* (*ReflectiveTrackerExample.cs*), which then tracks the number of hits.

You may add as many detectors as you want to objects in your scene. However, the script does not track collisions individually per detector. Instead, all detectors track hits on a scene-wide basis and tracks all collisions towards one tally.

Here is a step-by-step guide to using the script:

1. Download the script files from the download link at the end of this article.
2. Follow the instructions provided in [Working with scripts](/latest/creating-in-sansar/working-with-scripts.md) to upload the scripts to your inventory.
3. Simply drag the scripts to the scene and attach each script to an object. Remember, you may add as many detectors as you wish.
4. There are no parameters for these scripts, so once you finish adding the scripts to your scene, save and build your scene.
5. To test the script, visit the scene once it has been built.

**Note:** These files are also available in the client folder: Program Files > Sansar > Client > Script API > Examples

[Creative Commons License](/latest/creative-commons-license.md)

Have more questions? Join our [Discord!](https://discord.gg/sansarofficial)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sansar.com/latest/script-api-docs/example-scripts/reflective-detector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
