Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

short script only works in studio?

Asked by 9 years ago
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

1 answer

Log in to vote
0
Answered by
neff111 20
9 years ago

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

0
oh hey neff, didnt know you scripted. you probably dont know me but i do ;) UltraUnitMode 419 — 9y
0
thank you the script works now joeyortiger 30 — 9y
Ad

Answer this question