Loop In Gettable Error

Hey there!

I’ve been tinkering around with metatables for a new project of mine. The goal is to update physical values in the players’ directory whenever the players’ global dataTable is changed. I’ve tested this in-script and it’s worked perfectly. However, I’m running into an error I’ve never seen before.

Meet my nemisis =>image

What is this? Here’s the line of events leading up to this error.

  • Player joins game, this function is called

image

  • Then, this function is called on line 54

image

This just initiates all the meta-table stuff.

Now, after attempting to farm (main mechanic in this game), the server runs the following code.

image

Behold line 101. (Different line number from error stack above, but same code)
This is where the “loop in gettable” error is coming from. This function accesses the dataTable
once before and has no error. However, when attempting to access a second time, this error is thrown.

I’m completely clueless with metatables since I just started working with them. Any help is super helpful. Thanks!

2 Likes

I’ve got the same error. Whenever I try to access a table value. Specifically, trying to retrieve a Vector3. For some reason when I initially set the value I’m trying to retrieve it fails to set.