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