1 | local NewCFrame = CFrame.new(MainPart.CFrame.lookVector * Speed) < -- line 18 |
error
1 | - Workspace.Player 1. Scripts.ShipFunctions: 18 : attempt to call field 'new' (a nil value) |
2 | 15 : 14 : 05.402 - Stack Begin |
3 | 15 : 14 : 05.402 - Script 'Workspace.Player1.Scripts.ShipFunctions' , Line 18 |
4 | 15 : 14 : 05.403 - Stack End |
You have, somewhere, used CFrame
as the name of a variable. That variable overwrote the usual CFrame
in CFrame.new
.
Look for CFrame =
appearing as a line somewhere in your code.