I am making a voting system, pretty simple, you click a button and your vote gets added, a text label adds your vote to it's count. Although it isn't working?

My button script

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
	script.Parent.Visible = false
	script.Parent.Parent.Play1.Visible = true
	script.Parent.Parent.Votes.Value.Value = script.Parent.Parent.Votes.Value.Value + 1
end)

My vote count display script

Value = script.Parent.Value

script.Parent.Text = Value.Value

Value.Changed:Connect(function()
	script.Parent.Text = Value.Value
end)



Both scripts are local scripts

2 comments

0

Why are you trying to get the value of a value? Also please tell me where the scripts are (such as in a intvalue or a player)

0

the value name is value, they are local scripts in a gui