Second value doesn't decrease?
Asked by
2_MMZ 1059
3 years ago
Hello. I'm remastering a game(which will remain anonymous for now.) The game features a map voting, and a countdown. When the player clicks the vote button, it allows them to add a vote, and only one. (Which works). The other part of the script constantly changes the "timeleft" text to "val2" which is how much time is left. But that doesn't work. Can I get any assistance on this? Here's my code:
01 | local remEvent = game.ReplicatedStorage.Remotes:WaitForChild( "RemoteEvent" ) |
02 | local remEvent 2 = game.ReplicatedStorage.Remotes:WaitForChild( "RemoteEvent2" ) |
03 | local val = script.Parent.votin.votes.votesgiven |
04 | local val 2 = script.Parent.votin.timeleft.decreasing |
05 | local gui = script.Parent |
07 | remEvent.OnServerEvent:Connect( function () |
09 | val.Value = val.Value + 1 |
12 | script.Parent.votin.votes.Text = "" ..val.Value |
15 | remEvent 2. OnServerEvent:Connect( function () |
17 | val 2. Value = val 2. Value - 1 |
22 | script.Parent.votin.timeleft.Text = "" ..val 2. Value |
Any working answer is appreciated.