I have a raycast I need to be able to get the cframe where it is firing(To basically get a part point towards it)
I’m trying to figure out whats wrong with my rayast lol
I have a raycast I need to be able to get the cframe where it is firing(To basically get a part point towards it)
I’m trying to figure out whats wrong with my rayast lol
Do you want to get the final position of the ray in case it doesn’t hit anything? In that case, you could simply add the origin of the ray to the direction, as they are both vectors, it’d look something like such:
local lookAtPos = rayOrigin + rayDir
.
If you want a given part to look at it, you’d simply have to do
part.CFrame = CFrame.lookAt(part.Pos, lookAtPos)