So I’ve been having trouble with making this part face the way that the player is looking whilst also spawning ontop of the raycast’s normal. I have the the raycast shooting down to detect that part the player is standing on. The part spawns perfectly on the normal, it just the orientation that I’m having a problem with. How do I go about doing this
local currentPivot = Character:GetPivot()
print(currentPivot)
local set_front_vector = Vector3.new(0, 1, 0) -- // This will make it so it will always look up in a way
local right_vector = set_front_vector:Cross(cast.Normal)
local cframe = CFrame.fromMatrix(cast.Position + Vector3.new(0,0,0), right_vector, cast.Normal)
EarthWall:PivotTo(cframe)