Attempted to index number with 'value'

So I’m currently trying to make a raid system. No need to go in-depth. A lot of my values are needed by the client and server so the ones I need I’m storing in replicated storage with the ‘Value’ entity.

I’m trying to call the value to change it by doing so:

currentObjScore.Value = 0
currentObjMax = secondObjMax
activeObj.Value += 1

but when I try and do this, it is throwing an error "attempt to index number with ‘Value’ which I do not understand because I know full well that when I have to call the number/data stored inside the value, i need to do [valuename].Value. Apparently roblox doesn’t seem to want to cooperate on this one. Any ideas?


For reference, it’s throwing this error with currentObjScore.Value = 0

currentObjScore is defined locally as local currentObjScore = ReplicatedStorage.arskelliusR.varSet2.currentObjScore

Can you send your scrimmageModule code?

I’ve updated the above to include some bits I missed out.

I can but its over 350 lines long

I managed to resolve the issue. I ended up not including a .Value on currentObjScore when I originally set it to zero.