Log("START"); Log(Lua.GetReturnVal<bool>("return GuildBankFrame:IsVisible()", 0)); In command line. This happens sometimes on like a half of my bots: https://puu.sh/r0KZY/712bcbac02.jpg
GuildBankFrame is most likely nil. Try the code directly inside WoW and it should give you an error as well. The code should probably look like: Code: Lua.GetReturnVal<bool>("return GuildBankFrame and GuildBankFrame:IsVisible()", 0);
But code i gave you works sometimes. https://puu.sh/r0LAR/4ebabbfbea.jpg that's the problem. Sometimes works sometimes sends errors.
That's why MaiN's code is correct and yours isn't. GuildBankFrame is nil until the guild bank is opened at least once. You need to check for this in your code because calling IsVisible while it's nil will throw a lua error. Once the guild bank has been opened and closed it will then be a valid frame with IsVisible as false. Further UI reloads resets it back to nil.