when I try to run this code;
game.Workspace.bigSector.PrimaryPart.CFrame = CFrame.new(game.Workspace.bigSector.Center.Position) - CFrame.Angles(0,math.rad(game.Workspace.playerShipMini.smallShip.Rotation.Y),0)
it gives me this error;
15:41:02.341 - Workspace.Script:15: bad argument #2 to '?' (Vector3 expected, got userdata) 15:41:02.346 - Script 'Workspace.Script', Line 15 - global move
what can I do to make this return an actual CFrame?
You have to multiply the CFrame when using CFrame.Angles as addition and subtraction of CFrames are reserved for Vector3 values. To make it so it subtracts the angle instead of adding onto it, you have to add a '-' (without quotes) before math.rad, like this:
game.Workspace.bigSector.PrimaryPart.CFrame = CFrame.new(game.Workspace.bigSector.Center.Position) * CFrame.Angles(0,-math.rad(game.Workspace.playerShipMini.smallShip.Rotation.Y),0)
I hope this answer helped you. If it did, be sure to accept it.