How to get a cframe from where the raycast hits

Simple question, just unsure how to do, can’t find much on it? Maybe i’m just blind, feel free to redirect me.

Instead of getting the position where the raycast hits i’m trying to get the CFrame, how can I do that?

You could create a CFrame from the hit’s position.

local hit = workspace:Raycast(origin, direction, yourRaycastParams)

if hit then
    local pos = CFrame.new(hit.Position)
end

and if you wanted to keep the same rotation as another CFrame:

local pos = CFrame.new(hit.Position) * CFrame.Angles(someCFrame:ToEularAnglesXYZ())