I'm making a game, and I made a teleport system, when you step on the teleport part, it teleports you, but when you hold a tool like the teleporter and go on the teleporter with it, it doesn't work.

It doesn't say that there are any errors in the output, that's the weird thing

Somebody here tried helping, but when you go in the teleporter you don't get teleported (for some particular reason.)

Here's the script, I can't seem to find the error though.

local TeleportTarget = game.Workspace.Teleporter2

script.Parent.Touched:Connect(function(hit)
	if hit:FindFirstAncestorOfClass("Humanoid") then
		local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
		Player.Character:moveTo(game.Workspace.Teleporter2.Position)
	end
end)

If you can find what the error is, i'd appreciate it.

(type = r6, if it has to do with something like that.)