How to make teleport player to part

this is my script and its not working

hitbox.Touched:Connect(function(hitpart)
		if not hitpart:IsDescendantOf(char) then 
			if hitpart.Parent:FindFirstChild("Humanoid") then
				local enemy = hitpart.Parent 
				if (table.find(ignorelist,enemy) == nil) then
					table.insert(ignorelist,enemy)
					local part = Instance.new("Part")
					part.Name = "TErasePart"
					part.Parent = game.Workspace
					part.CFrame = enemy.HumanoidRootPart.CFrame
					part.Transparency = 1
					part.CanTouch = false
					wait(10)
					
					enemy.Position = part.Position

Models don’t have a property called “Position”. Also, please use CFrame instead of Position when working with unanchored parts such as a player’s character.

enemy.PrimaryPart.CFrame = part.CFrame

Or use PivotTo:

enemy:PivotTo(part.CFrame)

PivotTo works just like Roblox’s move tool, meaning if the teleported enemy’s destination is obscured, they would appear on top of the object instead. Consider using the first method for clipping through walls.