of     1   

PHChamp
#194247930Friday, July 22, 2016 2:47 AM GMT

I am creating a character creator and I am trying to add hair. To add the hair I need to add a system that moves the hair to backpack if they pick something else. Here is bits of code of the system but when I click on the button, a hat spawns, but they keep spawning on top of each other which I don't want. I tried this system but it doesn't work, how would you fix this code? hairs = {} for h = 1,6 do hairs[h] = game.ServerStorage.Hair["Hair"..h]:Clone() hairs[h].Parent = Player.Backpack end Whatisin = {} function HairUpdate() if H_Val == 0 then wait(.01) else hairs[H_Val].Parent = Character table.insert(Whatisin, 1, hairs[H_Val]) end end function HFrontUpdateVal () if #table == 0 then H_Val = (H_Val + 1) % 6 else Whatisin[1].Parent = Player.Backpack table.remove(Whatisin, 1) H_Val = (H_Val + 1) % 6 end end function HBackUpdateVal () if #table == 0 then if H_Val == 0 then H_Val = 5 else H_Val = H_Val - 1 end else Whatisin[1].Parent = Player.Backpack table.remove(Whatisin, 1) if H_Val == 0 then H_Val = 5 else H_Val = H_Val - 1 end end end
PHChamp
#194248536Friday, July 22, 2016 2:55 AM GMT

Bump
PHChamp
#194249000Friday, July 22, 2016 3:02 AM GMT

Bump2
PHChamp
#194249254Friday, July 22, 2016 3:05 AM GMT

Bump3
PHChamp
#194250562Friday, July 22, 2016 3:24 AM GMT

bump4

    of     1