So far I create the object to a certain side of the player, no matter which direction he is facing.
shield.Position=spawnPos+Vector3.new(0,0,5)
How do you make it so it spawns directly in front of you no matter where you're facing?
It's as simple as this:
shield.CFrame = spawnCFrame * CFrame.new(0, 0, 5):inverse()
So, when positioning, you should use CFrame instead, otherwise the part would get placed above parts that are in the way.
Also, as variable spawnCFrame
suggests, you should have the CFrame of the origin(torso I guess), not position, like in your original script.