Ok so Im trying to have something happen if the Front side of a part is being touched
I tried using raycasting
ray = Ray.new(char.UpperTorso.Position,(char.UpperTorso.CFrame.lookVector).unit*5,true)
if workspace:FirstPartOnRay(ray,touch.Parent.UpperTorso) then
print('a')
end
This is in a touch function. If it touches I check if it touches the front of a part. It gives an error that says its a nil value. How else am i suppose to check which side the part touches?

2 comments
It's best if you look at the How to Make a Raycast Gun on Roblox's Wiki. Though, I hope you can understand it.
I asked a guy on discord and he said to use raycast. I thought it would work. I know what a ray is. And i did read that article.