of     1   

HatLicense
#185909296Wednesday, March 23, 2016 7:52 PM GMT

Is it possible to stop a function that is running in a script? For example I have an onTouched Function and I want it to run for about 5 seconds and then stop, but I don't want to have to disable the script it's in.
C_Sharper
#185910200Wednesday, March 23, 2016 8:10 PM GMT

local r = false script.Parent.Touched:connect(function(hit) if not r then r = true wait(5) script.Disabled = true end end)

    of     1