My game in progress breaks right before randomizing characters sometimes, telling me this:
Played is not a valid member of BoolValue, which is because it tries to get a player's values, instead getting a value for showing the value holder being ready for certain tasks, and tries to make it marked as "Played". I have already made a part in the script to try and prevent this:
if plyr.ClassName == "BoolValue" then
repeat
local plyr = plyrs[math.random(1,NumHelp.Value)]
until plyr.ClassName == "StringValue"
end
This piece, in line 1, tries to identify the problem by searching for the incorrect value for the randomized value "plyr". Then in lines 2-4, it continues to randomize the "plyr" value until it is what I want: a player's StringValue, or in other words, his username. That way I can use the value to access the player's achievements and stats and such. Also, here is the original plyr randomization directly before the last code block, which works:
local plyrs = script.Help.PlayerHelp.P1:GetChildren()
local plyr = plyrs[math.random(1,NumHelp.Value)]
Help would be appreciated, thanks! :)

1 comment
show us all of your code. you're not even showing the part that caused this error