In this script I'm working on; if you click a button it'll insert content from another table into an empty table, and if you click another button it should delete the content from the previously empty table. But an error message would appear saying, "Players.KatsuneSniper.PlayerGui.StartGui.main:207: bad argument #2 to 'remove' (number expected, got Object)"
for i = 1, #currentcam do table.remove(currentcam, currentcam[1]) end
table.remove()
uses two arguements, an array, and the key you want to remove, not the value. In order to remove the value, try this:
for i = 1, #currentcam do currentcam[1] = nil end