I’m shooting a slash projectile infront of the character 10 studs ahead but it’s orientation seems faced forward on the world axis and not in the direction of the character
I would like to simply keep the orientation it already has (in Replicated Storage)
EDIT: Here’s a visual demonstration of how the slash is supposed to face.
*The red arrow is just an aid to show the direction of the slash
The first row is the intended orientation, where the slash faces forward relative to the character’s direction.
The second row is the result of many solutions given in this thread, where it’s relative to the world axis and not the character’s direction, the result of
local offset = CFrame.new(0, 0, -10) --10 studs in front of the player
local Look = torso.CFrame.LookVector
local slashPosition = torso.CFrame.Position + Look * offset.p.z
local slashOrientation = torsoLook * offset
Slash.CFrame = CFrame.new(slashPosition, slashPosition + slashOrientation.LookVector)```
Get the rotation matrix by subtracting the position vector from the CFrame. Also, the new CFrame position should start with the position of the Torso - then you add the offset.
The slash appears infront, but unfortunately it doesn’t continue facing forward when the character turns to the right or left or any other direction, it keeps it’s sort of world-based forward orientation
Ah, sorry, it’s a bit difficult to explain
The slash is supposed to face forward infront of the character if that makes sense, so that it looks normal and not backwards or sideways when the character moves in other directions
It’s not supposed to be based on the world’s axis where it currently only faces forward
My objective was to keep the orientation it has in Rep Storage when it get’s parented into workspace and placed infront of the character