How would I make it so when the value is set to Reset, it stops the wait function in the if statement above it 'wait(roundtime)'.
local rs = game:GetService('ReplicatedStorage')
local timerv = rs:WaitForChild("Timer")
local roundtime = 60
timerv.Changed:Connect(function()
if timerv.Value == "Run" then
wait(roundtime)
timerv.Value = "Done"
elseif timerv.Value == "Reset" then
print("Reset")
end
end)

1 comment
you can't stop a wait function once it is ran