I made a teleporter but it ragdolls you when you teleport

I’m trying to make a teleporter to a control room that just simply teleports you up there.
The player gets ragdolled when they are teleported to the control room. Attached is a video below. I checked devforum for any similar issues but have not really seen any.

local teleporter = script.Parent.Teleporter
local location = script.Parent.Location
local cooldown = true

teleporter.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("HumanoidRootPart") then
		if cooldown == true then
			hit.Parent.HumanoidRootPart.CFrame = location.CFrame + Vector3.new(0,2,0)
			cooldown = false
			wait(5)
			cooldown = true
		end
	end
end)

location.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("HumanoidRootPart") then
		if cooldown == true then
			hit.Parent.HumanoidRootPart.CFrame = teleporter.CFrame + Vector3.new(0,2,0)
			cooldown = false
			wait(4)
			cooldown = true
		end
	end
end)

You should try multiplying your CFrame by another CFrame value instead of adding a Vector3. See if that does anything.

hit.Parent.HumanoidRootPart.CFrame = location.CFrame * CFrame.new(0, 2, 0) -- Instead of adding a Vector3, you should multiply by a new CFrame.

^ Write this for your teleporter as well.

1 Like

This still seems to get the same result sadly.

instead of using CFrame, try to use Position. because the HumanoidRootPart.CFrame will have the same exact rotation and position of the part, maybe this is the cause

1 Like

Thank you very much, this works well!

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