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

Code stopping randomly with no errors?

Asked by 9 years ago

This code stops working at/before line 7. I've put the print('Test') in several different places and it doesn't work. Really not sure why this is doing it. If I comment out game:GetService('ReplicatedStorage').Remote.SubmitVote:InvokeServer(v.Name) then it works fine.

for _,v in pairs (buttons) do
    v.MouseButton1Click:connect(function(t)
        for _,a in pairs (buttons) do
            a.Style = 'RobloxRoundButton'
        end
        v.Style = 'RobloxRoundDefaultButton'
        game:GetService('ReplicatedStorage').Remote.SubmitVote:InvokeServer(v.Name)
        print('Test')
        wait()
        script.Parent:Destroy()
    end)
end
0
What's the Server script listening to SubmitVote doing? (You need to have one) BlueTaslem 18071 — 9y
0
It's just printing the player name and their vote. The problem here is I'm not even getting the 'Test' to print in this code, which leads me to believe there's a syntax error or something. Verbero 0 — 9y

Answer this question