Variables disable functions & things?

So i dont really know how this is used in scripts
or is it a bug?..

local game = nil
--Now if you type 'game' nothing will pop up like :GetService() or .Workspace
--How is this even used?
--is it a bug?
local wait = nil
--Now wait() doesnt do anything
local Enum = nil
--Now Enums are gone..
--WHAT IS THIS?!

i dont really use it but i saw it in some scripts… WHY?!

It’s defining a local variable using a keyword, so when you attempt to use the keyword it is looking at the local variable… Which is of course nil.
It’s not a bug just bad practice.
Just remove them.

2 Likes

Your setting a local variable of the global variable, that removes the global variable from the scope that this local is defined in.

1 Like

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