player = game.Players.LocalPlayer flagy = player.hiddenstats.flagy click = script.Parent.Parent.Click local collection = {{script.Parent.Africa,123801872},{script.Parent.Argentina,150105851}, {script.Parent.B,37773697}, {script.Parent.Brazil,278590519}, {script.Parent.Canada,147508093},{script.Parent.Columbia,75566357}, {script.Parent.England,135576597}, {script.Parent.F,40310876}, {script.Parent.Holland,198692974}, {script.Parent.Italy,71938958}, {script.Parent.Japan,39572612}, {script.Parent.Mexico,141606489}, {script.Parent.Portugal,243828685}, {script.Parent.Russia,16822049}, {script.Parent.Spain,123802056}, {script.Parent.USA,7923366}} for a,b in pairs(collection)do b[1].MouseButton1Down:connect(function() click:Play() flagy.Value = b[2] end) end
please help
Is this in a GUI? I am pretty sure MouseButton1Down
only applies to Frames
/TextButtons
/Etc.
I don't see where you inserted hiddenstats.flagy
anywhere in the player, so I am going to assume that it was put in earlier in the script.
If this is in a LocalScript and not a decedent of PlayerGuis, it won't work. If this is in a Server script at all it, wont work. If it is in a BillboardGui and there is not local script in the PlayerGuis, it wont work.
Maybe the Tables or Tables is screwing things up a bit, but other than that, I wouldn't know.
I hope you find this the least bit helpful. q-q