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:
local remEvent = game.ReplicatedStorage.Remotes:WaitForChild("RemoteEvent")
local remEvent2 = game.ReplicatedStorage.Remotes:WaitForChild("RemoteEvent2")
local val = script.Parent.votin.votes.votesgiven
local val2 = script.Parent.votin.timeleft.decreasing
local gui = script.Parent
remEvent.OnServerEvent:Connect(function()
for i = 1,1 do
val.Value = val.Value + 1
end
print(val.Value)
script.Parent.votin.votes.Text = ""..val.Value
end)
remEvent2.OnServerEvent:Connect(function()
wait(1)
val2.Value = val2.Value - 1
end)
while true do
wait(0.1)
script.Parent.votin.timeleft.Text = ""..val2.Value
end
Any working answer is appreciated.
