Can't define the question any further.
In terms of running in studio you can use this InStudioMode
for play solo you will need to look at the network replicators as playing solo does not create these.
for the test server look for replicators as they are needed.
Hope this helps.
Edit:-
local isStudio = UserSettings().GameSettings:InStudioMode() -- this is how you get the info -- test for studio if UserSettings().GameSettings:InStudioMode() then print('you are in studio') else print('you are not in studio') end local NetworkServer = game:GetService('NetworkServer') -- NetworkServer from server side, NetworkClient for client side. if NetworkServer then -- nil if no service found print('running server') else print('not running server') end
This only shows the basics of how it would work.