ParaPlayer.ChangeState

Declaration

public void ChangeState(AvatarStateType state)

Parameter

stateThe AvatarStateType that the player is to perform.

Descriptions

This function causes the player to enter the given AvatarStateType.

local player = ParaPlayerService.GetLocalPlayer()
player:OnStateChanged(function(stateOld, stateNew)
    print(stateOld)
    print(stateNew)
end)
player:ChangeState(AvatarStateType.Dead)