Player flinging/tripping after being teleported

I’m having trouble figuring out how to fix the fling after you teleport a player, I also made sure to anchor all the parts and spaced out the teleporter to make sure it doesn’t fling the player.

local gameFolder = workspace:WaitForChild("GameFolder")
local events = game.ReplicatedStorage.Events

--// Door Teleport

local Doors = {
	{
		Name = "Rooftop Entrance",
		Door = gameFolder.TpDoors.RoofEntrance.Base,
		Destination = gameFolder.TpDoors.RoofExit.Tp
	},
	{
		Name = "Rooftop Exit",
		Door = gameFolder.TpDoors.RoofExit.Base,
		Destination = gameFolder.TpDoors.RoofEntrance.Tp
	},
}

local function setupDoor(doorData)
	local prompt = doorData.Door:WaitForChild("ProximityPrompt")
	local destination = doorData.Destination

	prompt.Triggered:Connect(function(player)
		local character = player.Character
		if not character then return end

		local root = character:FindFirstChild("HumanoidRootPart")
		if not root then return end

		-- Teleport first
		root.CFrame = destination.CFrame

		-- Reset all velocities
		for _, part in ipairs(character:GetDescendants()) do
			if part:IsA("BasePart") then
				part.AssemblyLinearVelocity = Vector3.zero
				part.AssemblyAngularVelocity = Vector3.zero
			end
		end

		-- Fire client event for teleport effects (particles, fade, etc.)
		events.teleportEvent:FireClient(player)
	end)
end

for _, door in ipairs(Doors) do
	setupDoor(door)
end

I’ve also set the linear and angular velocity to 0 to prevent the player from getting flinged, but the issue still persist. This never happened in any other of the games I’ve made, only this game alone has this issue.

Is there some settings that I’m missing or there something wrong with the code?

Is the CFrame, that you are setting the RootPart to, facing downwards by chance?

The teleport part is positioned like this, but previously I did make it small and kept it at a higher position. Im not sure if its facing downwards

The way i always got tp destinations was placing a Rig and copying the RootPart’s CFrame Position and Orientation into a CFrameValue, which would then result in the Character facing the same direction as the Rig, without any issue

1 Like

You mean copying the rig’s CFrame position in properties after positioning it at the place where the player is supposed to be teleported at?

Yes you set up a folder with CFrame Values named after the teleport destinations and get the CFrames by placing Rigs, copying the whole CFrame, and then removing the rig again, before runtime

Test it with one CFrame first to find out if it actually helps against the flinging

This actually solved the fling problem! Is it also possible to simply just change the parts orientation to fix the problem?

Ah yes its seems like its just the orientation of the part, meaning somehow I got the right orientation multiple times without realizing it, anyways thanks for the help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.