Im making a portal game where you can go through portals. I’m having an issue where the player will not go in front of the part, what I mean is when you touch the part I want the player to come out facing the same direction going in to make it seem less, but the issue I’m having is in some cases the player teleports into a wall the portal is on and you get stuck in it, please tell me how to get the player to teleport in front of the portal part so you don’t get stuck.
Code im using to teleport:
hit.Parent.HumanoidRootPart.CFrame = CFrame.new(orangePortal.Position + orangePortal.CFrame.LookVector) * CFrame.fromEulerAnglesXYZ(0, math.rad(180), 0)