I’m trying to make a game with random character designs, and I need help making a randomized hair.
For some reason, my script isn’t working. But there are no errors in the output, there’s also a file in ReplicatedStorage named Accessories.

I also tried adding Player.PlayerAdded but it still doesn’t seem to work. I also don’t know much about math.random so the error could be that.
crab_talk
(crabmania)
#2
Chosen is true no matter whether its true or false.
The for loop isn’t needed and you didn’t use to choose a hair
You can just do:
RandomHair = Accesories:GetChildren()[math.random(1, #Accesories:GetChildren())]
if Random Hair then
-- do a thing
end
Hope this helps
I can’t figure out how to debug the last bracket. There was an error every time I tried to debug it.
crab_talk
(crabmania)
#4
What was the error? ____________
crab_talk
(crabmania)
#6
i edited it, retry _____________