Invalid argument #1 to 'new' (Vector3 expected, got number)

Hi all,
I somehow ran into this error just now. I’m not sure why the error is popping up, as I did give three parameters for Vector3, and this error was not popping up a few hours ago even though I have not changed this section of code. I don’t think the error has something to do with variable previousSectorPosition, so any help with this would be appreciated. Thanks in advance!

for i,v in pairs(workspace:GetPartBoundsInBox(CFrame.new(previousSectorPosition), Vector3.new(1, 1, 1))) do

2 Likes

What is the previousSectorPosition?

1 Like

May you provide the whole script instead of the one line erroring? Thanks!

My bad guys, I found out that I declared previousSectorPosition as the wrong parameter causing the issue. I’ll make sure to include where previousSectorPosition is declared next time though.