You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? What I’m trying to achieve is a timer that will run when a part is touched and then the timer gets to zero, the timer Gui disappears.
-
What is the issue? Include screenshots / videos if possible! So the timer works. When you touch the part, the timer will appear. But if you keep touching that part, the timer speeds up, and if you step of the part, the timer stops.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub? I just tried to figure it out.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local seconds = script.Parent.Parent.Time
local debounce = false
script.Parent.Text = seconds.Value
function onTouched(hit)
wait(1)
script.Parent.Visible = true
seconds.Value = seconds.Value -1
local debounce = true
script.Parent.Text = seconds.Value
if seconds.Value == 0 then
script.Parent.Visible = false
local debounce = false
end
end
game.Workspace.Collosuem.Touched:connect(onTouched)
Have a great day! ![]()