What do you want to achieve? Keep it simple and clear!
printing a random item in a folder
What is the issue? Include screenshots / videos if possible!
so I’m trying to print a random item from a folder but I’m getting a error on the printing line
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried doing different things to try to print a random item
This is how you would get a random item from a folder.
local children = dropper:GetChildren() print(children[math.random(#children)])
This will error if there are no children. If that’s a concern, just check
Thanks its working, I also realize I don’t need the for loop and I think you meant
local children = Droppers:GetChildren()