Brainfart with _G

Hello!

I’ve been having a brain fart right now and I’m stuck on the most simple question that I’ve surely known the answer to for at least a year.
So I’m wondering lets say I have
_G.Name
and this value changes every five seconds but then on a different script it says:
local fullName = string.split(_G.Name," ")
Whenever _G.Name changes will fullName change?

2 Likes

of course not, you are defining it one time

I’ll just put it in a loop
while wait(5) do

Whenever _G.Name changes will fullName change?

No, it will not change as you already have a reference of whatever it is. You need to define it again if you want the updated one.

Since you assigned the current value to a local variable, it will have the old value’s reference.