#Optimization

36 messages · Page 1 of 1 (latest)

dusk bear
#

btw dont blame me its my first code ever...

terse ether
#

dawg wtf

#

use for i,v in pairs

dusk bear
#

did you read my message ?

terse ether
#

you said optimize

#

which is

dusk bear
#

yes

terse ether
#

for i,v in pairs is a better optimization

#

since you get the children

#

of the parent

#

and you can set the material through here not wasting a lot of time

#

by just like

dusk bear
#

I guess I understood

terse ether
#

v.Material = Enum.Material.blabla

dusk bear
#

oh ok

#

like

#

well idk how to do

#

nvm

#

imma try sum random stuff until I find out

rancid gullBOT
#

studio** You are now Level 3! **studio

terse ether
#
for i,v in pairs(script.Parent.Parent.Parent.Border:GetChildren()) do 
v.Material = Enum.Material.CorrodedMetal
v.Color = Color3.fromRGB(163, 162, 165)
end

#

@dusk bear this is how it works

dusk bear
#

what is pair meaning ?

#

just bcz of the 2 entries i and v ?

terse ether
dusk bear
#

oh ok

#

ty

terse ether
#

if you do print(v) it will print out the names of the stuff in the model

dusk bear
#

ohhhh ok

terse ether
#

if you do print(i) it will print the amount of there

dusk bear
#

I just understood

#

ok ok

#

ty

terse ether
#

np