Trouble getting character physics to toggle

I’ve been trying to get a frictionless movement system for the first person template (tribes style), and after a lot of attempts (both doing the physics calculations manually and doing it with the physics system), I finally got it working more or less how I want it to. When moving it to multiplayer though, I’ve run into many issues.

The worst issues are the crashes when deactivating the physics on the capsule, killing the engine entirely (this is present in offline as well), and in multiplayer the best result I can seem to get desyncs the client, and when the space bar is let go again, the player teleports back to where they were before moving.

I’m sure that it’s just me doing something wrong here, but I’m just not experienced enough with programming to know what’s going wrong. Does anyone have any ideas?