EgoMoose / character-sounds

Package for playing standard character sounds on Roblox avatars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Character Sounds

A replacement implementation of the RbxCharacterSounds script that is typically loaded into players by default.

Get it here:

API

--[=[
Creates a new sound listener

@param director Model -- The character model used to track state for playing sounds
@param performer Model? -- The character model the sounds will play on. Defaults to `director` if nil
@return SoundController: {
	cleanup: () -> (), -- stops sounds from playing and cleans them up
}
--]=]
function module.listen(director: Model, performer: Model?): SoundController

--[=[
Creates a new sound listener

@param performer Model -- The character model the sounds will play on
@return ManualSoundController: {
	cleanup: () -> (), -- stops sounds from playing and cleans them up
	fireState: (Enum.HumanoidStateType, ...any) -> (), -- fire a humanoid state for a reactive sound transition
	setVelocity: (Vector3) -> (), -- set the root part velocity
	setMoveDirection: (Vector3) -> (), -- set the humanoid's move direction
}
--]=]
function module.manual(performer: Model): ManualSoundController

An example of using this package to replicate the standard RbxCharacterSounds script can be found here.

About

Package for playing standard character sounds on Roblox avatars

License:MIT License


Languages

Language:Lua 100.0%