Uhh the title showed make it self explainitory by this point.;
You should instead of targeting an object CFrame as shown in the tutorial you watched, target the LookVector CFrame of your gun.