1 | game.Workspace.Part.Orientation = CFrame.fromOrientation( 5 , 5 , 5 ) |
In the output it says this : bad argument #3 to 'fromOrientation' (number expected, got no value)
Help?
First of all their is no such thing as from orientation.. use CFrame.new or Vector3.new
example:
1 | workspace.Part.Orientation = Vector 3. new( 5 , 5 , 5 ) |
2 |
3 | -- or.... |
4 | workspace.Part.Orientation = CFrame.new( 5 , 5 , 5 ) |
Either one will work...
CFrame.fromOrientation does not return anything. It is like how this prints nil.
1 | local p = print ( 'Hello world!' ) |
2 | print (p) |
Also, Orientation needs a Vector3 value, so you would do
1 | workspace.Part.Orientation = Vector 3. new( 5 , 5 , 5 ) |
If you wanted to CFrame it, you would do
1 | workspace.Part.CFrame = CFrame.Angles(math.rad( 5 ), math.rad( 5 ), math.rad( 5 )) |
Just a reminder, CFrame.Angles needs radians. So, you technically could do this
1 | workspace.Part.CFrame = CFrame.Angles( 0 , 90 , 0 ) |
but it probably would not be what you want. You should do
1 | workspace.Part.CFrame = CFrame.Angles( 0 , math.rad( 90 ), 0 ) |
to get radians. Hope this helps!