I have a brick with a script that tells a ray to shoot downwards from the rotation of the brick. Once the ray hits an object I grab that position and add 10 to the height. The problem with that is that the height is according to the global XYZ as seen here: https://gyazo.com/2023e0f4b18f94076a5036cf730b15cc
t = the bodyposition object
ray = Ray.new(start, (down))
object, hit = workspace:FindPartOnRay(ray)
if object then
t.Position = hit + Vector3.new(0,10,0)
What line of code would I add to offset 10 from the hit positions rotation? Like this: https://gyazo.com/d39d04e8de680db263e1a05ccae3d6dd

2 comments
Does this work on smooth terrain as well?
It should.