of     1   

Waffloid
#139409454Sunday, July 06, 2014 9:57 AM GMT

Whats the difference between for i,v in ipairs(array) do and for i,v in pairs(array) do? ~Swagilitious and not Nutricious~
wish_z
#139409598Sunday, July 06, 2014 10:01 AM GMT

ipairs only iterates tables with a numerical IN ORDER index while pairs iterate through all indexes try this table = {[1] = "Roblox",[2] = "Sweet", ["Water"] = "Coolio", [4] = "MyDawg"} for i,v in ipairs(table) do print(i,v) end print("Seperate") for i,v in pairs(table)do print(i,v) end
Waffloid
#139409905Sunday, July 06, 2014 10:10 AM GMT

Oh, okay. Thanks! ~Swagilitious and not Nutricious~
UncleTaz
#139410396Sunday, July 06, 2014 10:25 AM GMT

And i,v in pairs is used to do something to a models children. Or models in general try this; Stuff = game.Workspace.Model:GetChildren() <---- Defines the varible for i,v in pairs(Stuff) do <--- Makes everything in the model a single pair v.Transparency = 1 <--- Changes all children if they are single objects transparent end <--- Ends function
wish_z
#139410422Sunday, July 06, 2014 10:25 AM GMT

ipairs is better for iterating with :GetChildren(), because all indexes in :GetChildren() are numerical anyway.

    of     1