So this script is for a hair removal, if you click a tool your hair will be removed but in this case it didnt work, it kept saying y must be a nil value. Here's the script.
for i=1, #y do if (y[i].ClassName == "Accoutrement") then y[i]:remove() end end
Please help, :( i would very appreciate it! ;-;
See if this works.
Even if it doesn't it is the correct way to do it.
for i=1, #y do if y[i] then -- Makes sure that y[i] is not nil if (y[i].ClassName == "Accoutrement") then y[i]:Destroy() -- :remove() is deprecated end end end