How do I properly use lookVector?
Asked by
8 years ago Edited 8 years ago
Hey there, I'm really confused on how to use lookVector. Currently, I am working on a way to deflect rays off of a part. I'm not sure if I'm using lookVector correctly, but my idea is to use the lookVector to make it deflect off of the surface of the part. For the script handling the deflection, this is all I got.
1 | shield.Touched:connect( function (hit) |
2 | if hit.Name = = "Shot" then |
3 | local lookVector = shield.CFrame.lookVector |
4 | local shot = hit:clone() |
The deflection is a clone on purpose, so at one point it will look something like this: