SharedTable Assignining Question

The following code is in two separate scripts:

local sharedTable = SharedTableRegistry:GetSharedTable("Array")
sharedTable[1] = 1
local sharedTable = SharedTableRegistry:GetSharedTable("Array")
sharedTable[2] = 4

and the sharedTable looks like this:

{1, 2, 3}

Let’s say both scripts execute at exactly the same time.
Would script 2 assigning at index 2 override script 1?

No, they are modifying different indices.

You should be using .update though if the value you’re setting it to depends on the current value.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.