Provides a player state controller class that allows seamless saving and setting of the current player's state. It works by using a forked modified PlayerModule and Animate script, with exposed internal methods.
Get the latest version in Releases, or simply get the model from Roblox.
Simply place the Animate script inside StarterCharacterScripts, and place the PlayerModule script inside StarterPlayerScripts.
Saving state and setting it to the player:
local PlayerStateControllerClass = require("path to the module")
local Player = game:GetService("Players").LocalPlayer
local playerStateController = PlayerStateController.new()
local savedState = nil
playerStateController:init(Player)
savedState = playerStateController:GetCurrentState()
playerStateController:SetState(savedState)- There is a delay of one frame for the Camera to be in the correct state position, causing a jitter.