Why is my script not detecting the game ID correctly?

I have this script here which I have made to load my custom admin commands but it doesn’t seem to be working as it should be, where am I going wrong with this?

It should be detecting if the game has the correct GameId for it to load in, and for the games it should be in should show the error notification. (It always loads in the error, despite being the correct GameId to load in).

image Code.lua (825 Bytes)

Are you checking if the GameId is equal to the URL of the game? Because if you are checking the URL you should use PlaceId.

In your code, you should remove the “not” from the second line. if game.GameId == 0 then