General logic question regarding connect functions

Hi, I have a simple question that I don’t feel like testing my self right now
image
If I have a structure like this, would the local Settings variable be set by the connect function? Or are the variables within the function only specific to that function itself?

Just a general logic question I had thought on a whim, and if I’m correct in this assumption it’d be a very handy resource for me right now.

I know I could just do this
image
but I’m still curious about my question above

yes. hopefully my contribution to this was helpful.

you could easily test by doing ts (this):

local dT = 0

game:GetService("RunService").Heartbeat:Connect(function(dT)
    print(dT)
end)

edit: nevermind, my einstein level deduction says yes but your answer is actually no…

1 Like

thanks for your quick response! this will prove helpful in dynamic logic

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.