Why my script do not this remove all in the table? Somebody know how to fix my problem? I know I ask a lot questions but I am trying to learn..
--< Creates a table and insert values.
local Maps = {}
local AllMaps = RStorageService.Maps:GetChildren()
for i = 1, 3 do
local map = AllMaps[math.random(1, #AllMaps)]
table.insert(Maps, map)
end
print(Maps[1], Maps[2], Maps[3])
OutPut: Asylum, Mansion, Mansion
--< Now remove all values.
for i = 1, #Maps do
table.remove(Maps, i)
end
print(Maps[1], Maps[2], Maps[3])
OutPut: Asylum, nil, nil

1 comment
"Why my script do not this remove all in the table?" You might want to edit that, haha.