For simplicity lets say i am creating a new WedgePart in front of the player. How do i rotate the new part so that it is facing the same direction as the player?
I tried .Orientation as per the code below, however this rotates relative to the map xyz. The best i can figure on my own is that i need to use the lookvector of the player, however never using one yet i have failed to get anywhere.
Thanks in advance.
local part = Instance.new('WedgePart', game.Workspace)
part.Name = 'Slope'
part.CFrame = player.Character.PrimaryPart.CFrame * CFrame.new(0,0,-5)
part.Size = Vector3.new(10,15,15)
part.Orientation = Vector3.new(0,180,0)
part.BrickColor = BrickColor.Random()
part.CanCollide = true
part.Anchored = true
part.Material = 'Plastic'

3 comments
This? https://scriptinghelpers.org/questions/14747/what-is-lookvector-and-how-do-i-use-it
i had already spent ages trying to figue what was posted there out, i just took another look at it though and finally made sense of it. it wasn't specifcally what i needed but the answer was within the script there, so thanks for prompting me to have another look.
It happens for the best, stay strong in the scripting world.