In Core, How to open online mode

when I code :

if actor:IsA("Player") then
actor:TransferToScene("BattleScene")
end

tells "Unable to transfer players outside of online mode", but how to open online mode

"Does not work in preview mode or in games played locally"

as your resolution, yet that is Preview Mode. Game tell me "Unable to transfer players outside of online mode" still