Skip to content

cynkeyo/player-state-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Table of Contents

Setup

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.

How to use

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)

Known Issues

  • There is a delay of one frame for the Camera to be in the correct state position, causing a jitter.

About

Provides a player state controller class that allows for saving and setting of the current player's state.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages