Help making my RayCast aim down at the ground instead of where you look?
I am trying to make this ray aim down so i can find the part that's under you but it keeps only going in the direction of the lookVector.
This is what i have so far related to the Ray.
1 | local torso = player.Character.HumanoidRootPart |
2 | local ray = Ray.new(torso.CFrame.p, (torso.CFrame.lookVector + CFrame.fromEulerAnglesXYZ( 0 ,math.rad( 90 ), 0 ).p)* 100 ) |
3 | local part, position = game.Workspace:FindPartOnRay(ray) |
I played around with it and tried different CFrame combos but it seems to not work and only go in the direction you're looking. I'm trying to angle it down at the ground.