I tried
function Load()
CurrentBase = game.Workspace.Baseplate
CurrentBase.BrickColor = BrickColor.Random()
end
for i, v in pairs(getfenv(Load)) do
print(i,"=",v)
end
I tried
function Load()
CurrentBase = game.Workspace.Baseplate
CurrentBase.BrickColor = BrickColor.Random()
end
for i, v in pairs(getfenv(Load)) do
print(i,"=",v)
end
You can just return the variables in the function
Example:
function Load()
CurrentBase = workspace.Baseplate
CurrentBase.BrickColor = Brickcolor.Random()
return CurrentBase, CurrentBase.BrickColor
end
print(Load())
This discussion is preserved as it was. New answers, comments, and votes are closed.