Problem with cfarme and cframe.lookat

  1. What do you want to achieve?
    i want the player to teleport to a location and play the animation upon using the proxmity prompt
  2. What is the issue?
    the cframe doesnt teleport the player to the intended loaction but to other loaction
  3. What solutions have you tried so far?
    trying to make a position part but didnt work
-- prox.PromptButtonHoldBegan:Connect(function(player)
	local anime = Instance.new("Animation")
	anime.AnimationId = "rbxassetid://6996686813"
	playanim = player.Character.Humanoid:LoadAnimation(anime)
	knife.Parent = player.Character
	player.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(playercuttingpoint.Position))
	player.Character.HumanoidRootPart.CFrame = CFrame.lookAt(Vector3.new(playercuttingpoint.Position - Vector3.new(0,2,0),Vector3.new(cutting.Position)))
	player.Character.Humanoid.WalkSpeed = 0
	playanim:Play()
	for index , value in ipairs(tableknife) do
		if value:IsA("Part")  or value:IsA("WedgePart") then
			value.Transparency = 1
		end
	end
end)

idk what i did worng can someone help?

Try doing player.Character:FindFirstChild(“HumanoidRootPart”) instead of getting it directly

I would suggest doing:

player.Character:WaitForChild("HumanoidRootPart").CFrame = playercuttingpoint.CFrame

I don’t understand what you are trying to achieve with:

player.Character.HumanoidRootPart.CFrame = CFrame.lookAt(Vector3.new(playercuttingpoint.Position - Vector3.new(0,2,0),Vector3.new(cutting.Position)))

Why dont u do this?

Cframe are made from position and orientation which is vector3

It should look like this

script.Parent.HumanoidRootpart.CFrame =
CFrame.new(spawn.Position,spawn.Orientation)

It will then teleport to a position and rotate to rotation

Sry i didnt see that the script is located outside of the character, to fix is just do a same thing like you did but just change a cframe location to my script

I fixed the look at and also the setting of the CFrame

sorry i wasnt online the whole day so i didnt replay early thx anyway