How do I make my teleportation a smooth transition

Hello, I’m making a portal gun game but I’m having an issue where going through the portal is not smooth in some cases. . As you can see when the portal is across from each other its looks smooth and clean, but when there at diffrent angles you character does not rotate and you walk out of the portal side ways or another direction. Please help

Teleport script on touch:

hit.Parent.HumanoidRootPart.CFrame = bluePortal.CFrame *, 0, -1)


especially when the portal goes upside down or on the ground, you just go flying and cant move

1 Like

I’m thinking you could use :SetPrimaryPartCFrame() on hit’s parent.

if hit.Parent:FindFirstChild('Humanoid') then
    hit.Parent:SetPrimaryPartCFrame(bluePortal.CFrame * CFrame.Angles(math.rad(bluePortal.Orientation.X), math.rad(bluePortal.Orientation.Y), math.rad(bluePortal.Orientation.Z)) -- sets its PrimaryPartCFrame to bluePortal's orientation

This does not work, in first person you still come out to the side from an angle you can from. It also now clips the player though walls/floors and you get stuck.

1 Like

Maybe you could try making an offset. Let me know if this solves that clipping thing.

local offsetCFrame =,0,0) -- offset
local portalCFrame = bluePortal.CFrame
local newCFrame = bluePortal.CFrame * offsetCFrame

1 Like

now this works the problem is when in first person, the camera auto rotates the player to where its looking. How could I fix that?

I’m not really sure if it’s possible, but maybe you would like to just rotate the camera where the second portal is facing?

1 Like

but how would I go about doing that?

I’ve done some research and I’ve found a possible way to do that. Here is the topic. And sorry, I gotta go now, so I won’t answer fast anymore.