RetroStudio Documentation
Code BlocksObjectsGuides
  • Index
  • Code Blocks
    • Code Block Index
    • Actions
      • General
        • Set Object Property
        • Get Object Property
        • Tween Object Property
        • Create Object
        • Destroy Object
        • Clone Object
        • Is A
        • Is Touching
        • Get Touching Parts
        • Get Connected Parts
      • Hierarchy
        • Find First Child
        • Find First Child Which IsA
        • Find First Child Of Class
        • Wait For Child
        • Get Random Child
        • Get Children
        • Get Descendants
        • Is Descendant Of
        • Is Ancestor Of
      • Physics
        • Make Joints
        • Break Joints
        • Set Part Network Owner
        • Find Part On Ray
        • Set Part Physical Properties
        • Get Part Physical Properties
        • Fire Rocket Propulsion
        • Abort Rocket Propulsion
      • Models
        • Move Model To
        • Set Model PrimaryPart CFrame
        • Get Model Bounding Box
      • Sounds
        • Play Sound
        • Stop Sound
        • Pause Sound
        • Resume Sound
      • Leaderstats
        • Create Leaderstat
        • Get Leaderstat
    • Input
      • Mouse
        • Click Detector Interaction
        • Get Mouse Target Part
        • Get Mouse Target Surface
        • Get Mouse Position 2D
        • Get Mouse Position 3D
        • Left Mouse Down
        • Left Mouse Up
        • Right Mouse Down
        • Right Mouse Up
        • Set Mouse Target Filter
      • Keyboard
        • Key Down
        • Key Up
      • GUI
        • GUI Mouse Enter
        • GUI Mouse Leave
        • GUI Mouse Moved
        • GUI Mouse Wheel Up
        • GUI Mouse Wheel Down
      • GUI Buttons
        • GUI Left Click
        • GUI Left Mouse Down
        • GUI Left Mouse Up
        • GUI Right Click
        • GUI Right Mouse Down
        • GUI Right Mouse Up
      • Text Box
        • Text Box Focused
        • Text Box Focus Lost
    • Miscellaneous
      • Variables
        • Set Variable
        • Print
        • Warn
        • If
        • Type Of
      • Loops
        • For Loop
        • While Loop
        • Loop Through Table
        • Loop Through Children
        • Loop Through Descendants
        • Break Loop
        • Continue Loop
      • Functions
        • Define Function
        • Function Return
        • Execute Function
      • Run
        • Wait
        • Do Not Run
        • Execute Block
        • Render Stepped
      • Run
  • Objects
    • Objects Index
    • Instances
      • Accoutrement
      • Animation
      • Backpack
      • BillboardGui
      • BindableEvent
      • BindableFunction
      • BlockMesh
      • BodyAngularVelocity
      • BodyColors
      • BodyForce
      • BodyGyro
      • BodyPosition
      • BodyThrust
      • BoolValue
      • BrickColorValue
      • Decal
      • Dialog
      • Explosion
      • Fire
      • Smoke
      • SpawnLocation
      • SpecialMesh
      • Team
      • Texture
      • Tool
      • Truss
      • Weld
    • Services
      • Workspace
      • Players
      • Lighting
      • StarterGui
      • StarterPack
      • Debris
      • Teams
      • Soundscape
  • Guides
    • Guides Index
    • Simple Guides
      • Intro to Loops
      • How to make a Debounce Script
Powered by GitBook
On this page
  • Description
  • Inputs
  • Outputs
Edit on GitHub
  1. Code Blocks
  2. Actions
  3. Physics

Find Part On Ray

Description

Sends out a invisible ray from a point in space with a specific direction and length, and then detects if it hits a part. If nothing is hit, the output will all be nil.

Available to

Inputs

Origin (Vector3)

You set the Origin of the Raycast.

0,0,0

Direction (Vector3)

You set the Direction of the Raycast.

0,-5,0

FilterType (Choice)

You set the FilterType of the Raycast.

Blacklist

Filter DescendantsTable (Table)

You set the filter table for the given FilterType.

BlacklistedParts

Outputs

Instance (Object)

Returns the Object that got found by the raycast.

Returns nil if no object was found.

HitPart

Position (Vector3)

Returns the Position, where the raycast hitted the Instance.

Returns nil if no object was found.

HitPosition

Normal (Vector3)

Returns nil if no object was found.

PreviousSet Part Network OwnerNextSet Part Physical Properties

Last updated 1 year ago