I’m not that much of a good explainer (feels like vague or too specific lmao), but the main stuff i did was well other than it being obvious it’s IKControl instances i did not use manual cframe numbers since that can stack up and lag code.
(In-engine assets will always be faster aka IKControls)
This actually runs on the server and doesnt impact too much on the network nor framerates..
(you can do a whole lot of optimizing if you have lots of players; max IKControl render dist, how much legs can be replicated, tickrate, etc etc)
I added 5 remoteevents (last one which is ProneAngle its optional)
1 for default stance, one for jump requests, another for moving requests, last is the camera lookvector updater (since you can’t get the players camera via server)
If you have a game that is sure as hell the player cannot be pushed around then you should do camera:GetPropertyChangedSignal(“CFrame”) instead of renderstepped which i did since my players can be pushed without their keys being pressed.
The jump,stance, and move requests are events handled on the client so the user can have 0 visual delay
(if you want to get fancy when the player presses a key or stops moving or jumps whatever the action is you should also fire remoteevents or OnClientEvent to their client (or to yours if theyre the ones who pressed) to replicate other players nearby so if you have like a serious PvP game or smthng both ends will have almost 0 delay)
VVVVV – here if you just want to know how i did leg position whatever
When the player is not moving/idle have like a local or in this case i used a table {}
where you set the default lookdirection of the HumanoidRootPart then in a runservice (on server) you just gotta calculate how much the players Camera (from the remote event of the camera i said earlier) if that direction say is greater looking left/right of around 45.
for leg plant “animation” it’s just positioning and determining not really animations.
If the players camera looks left the the attachments on the legs will lift and have an offset for the left direction and opposite for the rightside.
(make sure use connections so when the player moves or flicks the camera to fast their character model doesnt stutter or glitch out, thats why you need the move Requests jump req etc. when those actions are hit they get fired to the server and cancel or disconnect every leg plant event currently going)
(optional, but if you plan on having them have different leg plants or positions depending on a tool or certain situation, i highly RECOMMEND you define a static leg plant pose then using childadded say if you use a tool or smthng .Changed, change that default leg plant into ur whatever leg plant pose you want, same thing goes with hipheights etc)