Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

The script isn't cycling through my table, why?

Asked by 7 years ago
local Hair = game.Lighting.Hairs
local hairIDMale = {"http://www.roblox.com/asset/?id=16627529", "http://www.roblox.com/asset/?id=643127865", "http://www.roblox.com/asset/?id=62246019", "http://www.roblox.com/asset/?id=15730710", "http://www.roblox.com/asset/?id=12259089"}

Looks.HairDesign.Next.MouseButton1Click:Connect(function(a)
    if player.Character:FindFirstChild("Hairs") == nil then
    local Hairss = Hair:Clone()
    Hairss.Parent = player.Character
    end
    for i,v in pairs(hairIDMale) do
        if a then
            player.Character.Hairs.Handle.MeshId = v
        else
            print (hairIDMale[2])
        end
    end
end)

I'm trying to make it so when the player clicks down, the next string in the table will be the MeshID ;-; But it's not working, and I don't know why.

Help please!

Answer this question