Recreation Steps & Actual Behaviour:
- Go into Roblox Studio
- In the command bar, type the commands as seen in this image (which was run while the game was “Running” but the same thing happens even if it isn’t running):
Text version:
> a = {}
> function b() print(a) end
> a = nil
> b()
table: 0x513f0647d4fecc0d {}
> a = {} function b() print(a) end
> a = nil
> b()
nil
(The only difference between the two code blocks is that you end up pressing Enter
four times in the first and three times in the second.)
Expected Behaviour:
Assigning to a
should overwrite the value that b
sees regardless of which line b
is defined.
Notes:
- Exiting all Betas and restarting Studio did not change the result
- I’m on Windows 10, Roblox Studio Version 0.476.5.421371 (64bit)
- Disabling plugins made no difference
- Disabling these properties made no difference (I didn’t test all of them):
Debugger Enabled
andCommand bar operates on local state at breakpoint