Hey, and thanks for reading in advance.
I know that local variables no longer hold reference when a function reaches the end of scope, but what about when you initiate a subroutine/task inside of a function?
Such as:
function foo()
local Player = game.Players.Geomaster
--
task.spawn(function()
local startTime = tick()
while tick() - startTime < 8 do
print 'bar'; task.wait()
end
end)
--
end
Would ‘Player’ lose the strong reference to myself at the end of the function, or would the subroutine keep that variable within scope while it persists?
Answers or advice are appreciated.