I'm new to raycasting so, i've made a tool and i am trying to create a way starting from the objects face. But i when i do so the the result isnt what i want, i want it so that when the object moves and rotates and stuff, the ray follows it and faces it, but the ray just is still and doesnt change, im trying to check what part is firstly infront of the object basically.
My script:
if script.Parent.Aiming.Value then
local ray = Ray.new(script.Parent.aimS.CFrame.p, Vector3.new(0, 0, 1))
local partHit = workspace:FindPartOnRay(ray)
print(partHit)
else
Please help
Thx
