split screen from script

I need help activating splitscreen from a script, i am making a game with both singleplayer and multiplayer
so i need to be able to turn it off and on.

Use this but modify it to disable the other camera instead of changing it’s size and only change the size of one camera.