How do I use Raycasts to teleport an object?

I have a bunch of prefabs, that I want to teleport in the air then send a raycast down and teleport to where the raycast hits, can someone help?

Also, this is the first time I’ve used forums so I don’t know how anything works…

  • teleport in the air
    Just increase the Y position of the character
  • send raycast down
    Shoot raycast from the character position with vector3.down/-vector3.up
  • teleport down
    Teleport down to the raycasthit position (maybe with an offset if the player’s middle is the pivot)

ok ty