local NewCFrame = CFrame.new(MainPart.CFrame.lookVector * Speed) <-- line 18
error
- Workspace.Player1.Scripts.ShipFunctions:18: attempt to call field 'new' (a nil value) 15:14:05.402 - Stack Begin 15:14:05.402 - Script 'Workspace.Player1.Scripts.ShipFunctions', Line 18 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.