Error: Workspace.Main:55: bad argument #1 (Vector3 expected, got CFrame)

local RedRoomSpawnPoints = {
	CFrame.new(229.5, 2, 232),
	CFrame.new(234.5, 2, 232),
	CFrame.new(238.5, 2, 232),
	CFrame.new(238.5, 7, 232),
	CFrame.new(238.5, 11, 232),
	CFrame.new(233.5, 11, 232),
	CFrame.new(229.5, 11, 232),
	CFrame.new(224.5, 11, 232),
	CFrame.new(214.5, 6, 232),
	CFrame.new(217.5, 3, 232),
	CFrame.new(224.5, 7, 232),
	CFrame.new(229.5, 14, 232),
	CFrame.new(222.5, 14, 232),
	CFrame.new(238.5, 10, 232),
}

	workspace.RedRoom.Win.CFrame = RedRoomSpawnPoints[math.random(1, #RedRoomSpawnPoints)]

2 comments

0

Just replace CFrame with Vector3 throughout the whole table. You don't have to change the numbers.

0

And change CFrame to Position on line 18