local plr = game:GetService("Players").LocalPlayer
local char = plr.Character
local button = script.Parent.ScreenGui.TextButton
local time = 5
local debounce = false
button.MouseButton1Click:Connect(function()
if debounce then
debounce = true
end
char.HumanoidRootPart.CFrame = CFrame.new(-86.584, 3, -3.019)
while wait(1) do
if time == 0 then
button.Text = "Start!"
wait()
else
button.Text = tostring(time)
time = time - 1
debounce = false
end
end
end)
COMMUNITY QUESTION
Timer does not restart when I click the button again, could anyone please help me with this?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
I'm sorry, I'm looking over your code and can't really understand what you're trying to achieve. Could you please explain what this is suppose to do?
if you can't understand it yourself then you can't really help max
This isn't the case, I can't help if I don't know what he's trying to achieve.