I've tried everything to fix this, but nothing works. There is no output. This is how the objects in the script look like in Explorer:
Frame
**-**Minigame1 (TextButton, it's text is "Minigame1". It's BackgroundColor3 is 255,255,255.)
**- -**Problem Script (The script that I'm trying to fix.)
**- -**Voted (BoolValue, It's value is False.)
**-**Minigame2 (TextButton, it's text is "Minigame2". It's BackgroundColor3 is 255,255,255.)
**- -**Problem Script (The script that I'm trying to fix.)
**- -**Voted (BoolValue, It's value is False.)
**-**Minigame3 (TextButton, it's text is "Minigame3". It's BackgroundColor3 is 255,255,255.)
**- -**Problem Script (The script that I'm trying to fix.)
**- -**Voted (BoolValue, It's value is False.)
Workspace
**-**Minigame1Votes (IntValue, it's value is 0.)
**-**Minigame2Votes (IntValue, it's value is 0.)
**-**Minigame3Votes (IntValue, it's value is 0.)
This is the problem script in the Buttons:
chosen = script.Parent:WaitForChild("Voted")
script.Parent.MouseButton1Click:connect(function()
if chosen.Value == false and script.Parent.BackgroundColor3 ~= Color3.new(0,1,0) then
chosen.Value = true
script.Parent.BackgroundColor3 = Color3.new(0,1,0)
game.Workspace["" ..script.Parent.Text.. "Votes"].Value = game.Workspace["" ..script.Parent.Text.. "Votes"].Value + 1
local lastvoted = nil
for i,v in pairs(script.Parent.Parent:GetChildren()) do
if v:IsA("TextButton") then
if v.Voted.Value == true then
v.BackgroundColor3 = Color3.new(1,1,1)
v.Voted.Value = false
lastvoted = v
end
end
end
if lastvoted then
if game.Workspace["" ..lastvoted.Text.. "Votes"].Value > 0 then
game.Workspace["" ..lastvoted.Text.. "Votes"].Value = game.Workspace["" ..lastvoted.Text.. "Votes"].Value - 1
end
end
end
end)
The button does not change color, nor do the values in Workspace change.

8 comments
Is there any output?
I have it in the first sentence already. "There is no output." In bold text...
Try adding print methods to the script and see where it stops outputting messages. Post the modified script and outputted messages here.
I've tried that before. I put prints between every single line in the script (Including the ends and such), and it printed every single one into the Output.
Well what's your goal, what's not working right, etc. Please explain your questions.
@Perci, if the script's parent isn't voted when it's clicked, then it votes for it by making the script's parent green and setting its "Voted" value to true. It changes the other 2 buttons to white (255,255,255) and it's Voted value to false. Their texts are "Minigame1", "Minigame2", and "Minigame3". There are 3 IntValues in workspace. "Minigame1Votes", "Minigame2Votes", and "Minigame3Votes". When
a button is clicked, let's say Minigame1 is clicked, the button turns green and "Minigame1Votes" in Workspace goes up. It unvotes any other ones that were already voted for (Makes when white again and subtracts one from the value in Workspace)
The problem is, no buttons are turning green/white, and the values in Workspace don't change. It's almost as if there's no script in the buttons at all.