d.CFrame = Torso.CFrame * CFrame.new(Vector3.new(0, 0.5, -2)) * CFrame.fromEulerAnglesXYZ(Torso.CFrame.lookVector)
12:05:00.422 - Players.Player.PlayerGui.Moves:169: bad argument #3 to 'fromEulerAnglesXYZ' (number expected, got no value)
The problem is that CFrame.fromEulerAnglesXYZ
must be given 3 number
s, but you're giving it a Vector3
. To solve the problem:
d.CFrame = Torso.CFrame * CFrame.new(Vector3.new(0, 0.5, -2)) * CFrame.fromEulerAnglesXYZ(Torso.CFrame.lookVector.X, Torso.CFrame.lookVector.Y, Torso.CFrame.lookVector.Z)