local posTable = {"pos1", "pos2", "pos3", "pos4"}
for i = 1, 24 do
n = math.random(1, #posTable)
pos = posTable[n]
newPos = game.ReplicatedStorage.positions:FindFirstChild(pos)
print("posName: " .. newPos.Name)
print("posValue: " .. newPos.Value)
end
As the title suggests, what is giving me this error?
I get the following output:
posName: pos3
22:18:09.602 - Workspace.Script:8: attempt to concatenate field 'Value' (a userdata value)
22:18:09.602 - Stack Begin
22:18:09.602 - Script 'Workspace.Script', Line 8
22:18:09.603 - Stack End

1 comment
I have everything in the proper hierarchies, as evidenced by the "posName: " line printing properly.