About 584,000 results
Open links in new tab
  1. How would I declare a multidimensional array? - Roblox

    Jan 6, 2021 · In Lua, I have tried to replicate this but i believe i am not actually creating a multidimensional array but just a single one by doing this. So instead I found a way to create multidimensional arrays by doing this: for i= 1, 30 do . array[i] = {} for j= 1, 20 do . array[i][j] = {} for k= 1, 30 do . array[i][j][k] = ? end end end.

  2. Intro to arrays | Documentation - Roblox Creator Hub

    Learn how to use arrays in Luau to store multiple values at a time. This tutorial shows how to create and change arrays while making an interactive NPC in Roblox.

  3. Tables | Documentation - Roblox Creator Hub

    Arrays. An array is an ordered list of values. Arrays are useful for storing collections of data, such as a group of players with special permissions. Create arrays. To create an array using a Luau table, declare the values in sequential order, separated by commas.

  4. Optimizing Multidimensional Arrays With table.create - Roblox

    Dec 31, 2019 · That can be expensive especially with multidimensional arrays. table.create allows you to preallocate a certain amount of space for an array in one go meaning Roblox doesn’t spend as much time allocating the values you add! Here are some examples: for x= 1, width do . array[x] = table. create (height) -- Create a column for y= 1, height do .

  5. Multidimensional Arrays in Roblox Studio (& Module) - YouTube

    In this video, I explain multidimensional arrays (mostly 2D arrays), that allow you to do many cool things in Roblox, such as my Mazes. I hope you enjoy!

  6. Optimizing 2D array generation for flow fields - Code Review ... - Roblox

    Oct 22, 2021 · My first recommendation would be to use table.create to optimize allocations: function Grid.new (gridSize) local grid = table.create (gridSize.X) for x = 1, gridSize.X do grid [x] = table.create (gridSize.Y) for y = 1, gridSize.Y do grid [x] [y] = {} end end return grid end This results in … for x = 1, gridSize.X do .

  7. How do I make a 2D array in Lua? - Stack Overflow

    How can I make a 2D array with Lua? I need to dynamically create this. local tbl = { { } } Something like the above but where I can specify how many items. In my case they'll be the same amount. I basically want to access it like tbl[3][5]. Thanks

  8. Make changes to arrays | Documentation - Roblox Creator Hub

    Add values to arrays. To add a new value to an array, use table.insert(array, valueToInsert). The second parameter can be any value such as a string, number, or entire object, like Player or IntValue. To practice, you'll create a script that stores player items in a table, then add to it.

  9. Arrays and dictionaries | Documentation - Roblox Creator Hub

    Learn common structures for storing sets of information, such as arrays and dictionaries, and use cases for each structure. Be able to manipulate data structures, such as adding, removing, or returning values from a structure like an array. Have a general understanding of variables in Luau.

  10. Multi Dimensional Arrays / Tables (Roblox Studio Tutorial) by …

    This scripting tutorial will be about multi dimensional array tables in Roblox, specifically 2D arrays and 3D arrays.By PrizeCP Extreme Simple Series 2About ...

  11. Some results have been removed
Refresh