Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Doesn't work, should be easy?

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)

1 answer

The problem is that CFrame.fromEulerAnglesXYZ must be given 3 numbers, 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)

This discussion is preserved as it was. New answers, comments, and votes are closed.