Do the understand the difference between : and . in Lua? Your post doesn’t seem to suggest so.
You said the error is the same even when you switched from table:clear(v) to table.clear(v) am I right? Then the problem is that v is read-only but it doesn’t seem like you actually tried using table.clear(v) so I can’t say for certain?
@Blockzez is correct. If you try using table:clear(v) in studio it will underline v in studio with the error
Argument count mismatch. Function ‘table.clear’ expects 1 argument, but 2 are specified
Once it’s changed to table.clear(v) the error is gone.
I tested your code and I got the same error with table:clear but it runs fine with table.clear so not sure why it’s still producing the same error for you.