I have a TextBox and I want it to time the amount of time it takes to type in a certain piece of text, however, whenever I have used the 'Changed' function it just starts multiple timers every time the TextBox has changed. This is what I have come up with so far but can't figure out the rest. (Local script)
Code:
local timer = 0 script.Parent.enterText.Changed:Connect(function() while timer < 60 do if timer > 1 then print("Timer started") wait(1) timer = timer + 1 else timer = timer + 1 end end end)
You can do this using the Focused
event.
-- Simplified version local timer = 0 script.Parent.enterText.Focused:Connect(function() for i = 0, 60 do timer = i + 1 wait(1) end end)