RemoteBuildMode, PlaceId==0, CreatorId==0 are actually invalid ways to check if you are in offline/studio mode as they do not work with the most recent version(s) of RBX Studio.
Alternatives?
An easy alternative would be to use the RunService functions. For example, the IsStudio function. This function return's a boolean, true if called from studio, false if not.
game:GetService("RunService").IsStudio()
-> true or false
Also suggest looking at the RunService functions as there are a couple more functions available to help you with your problem.