I have a Brick that, when you step on it, is supposed to change the votes displayed on it to what it was before +1
I have a NumValue named "Votes" that is default 0, and the TextLabel that goes on the brick that displays the votes is called "VotesDisplay" and it's default is 0 as well.
I'm not getting any errors when I run it. Nothing happens when I test the game, I step on the brick and the Vote Count stays the same.
VotingPads = game.Workspace.VotingPads.VoteMap1.Sign timewait = 0 script.Parent.Touched:connect(function(hit) VotingPads.Votes.Value = VotingPads.Votes.Value + 1 wait(0.1) VotingPads.VotesDisplay.Text = VotingPads.Votes.Value end)
Try using this.
local votingPads = workspace.VotingPads.VoteMap1.Sign local canVote = true --set a debounce so we can't vote more than once. script.Parent.Touched:connect(function() if canVote then --if you can vote... do this local value = votingPads.Votes --sets a variable to the value local display = votingPads.VotesDisplay value.Value = value.Value + 1 --adds one to the value wait() display.Text = value.Value canVote = false --make it so you can't vote again. end end)