RagdollSystem
Types
SystemSettings
type SystemSettings = {LowDetailModeThreshold: number,CollapseTimoutInterval: number,CollapseTimeoutDistanceThreshold: number,FreezeIfDead: boolean,}
LowDetailModeThreshold: the number of active ragdolls before the system
starts using low detail mode.
CollapseTimeoutInterval: the interval in
seconds between ragdoll distance checks while collapsed.
CollapseTimeoutDistanceThreshold: the minimum distance in studs a ragdoll
must have moved between distance checks to remain collapsed.
FreezeIfDead: Whether the system freezes dead ragdolls that have stopped
moving
Properties
Blueprint
This item is read only and cannot be modified. Read OnlyRagdollSystem.Blueprint: BlueprintA reference to the base Blueprint class
RagdollFactory
This item is read only and cannot be modified. Read OnlyRagdollSystem.RagdollFactory: RagdollFactoryA reference to the Ragdoll Factory
RagdollConstructed
This item is read only and cannot be modified. Read OnlyRagdollSystem.RagdollConstructed: SignalFires when a ragdoll is constructed by the Ragdoll Factory.
RagdollSystem.RagdollConstructed:Connect(function(ragdoll: Ragdoll)
doSomething(ragdoll)
end)
Functions
setSystemSettings
Sets the settings of the system, all fields are optional. If a field is not provided, it remains unchanged.
RagdollSystem:setSystemSettings({
FreezeIfDead = false,
}) -- This is ok.
getSystemSettings
getRagdoll
Returns the ragdoll corresponding to the model or nil if there isn't one.
activateRagdoll
Activates ragdoll physics on the ragdoll.
deactivateRagdoll
Deactivates ragdoll physics on the ragdoll.
collapseRagdoll
Activates ragdoll physics on the ragdoll, deactivates ragdoll physics after the ragdoll has remained still for 1+ seconds.
addRagdoll
Creates and caches a ragdoll corresponding to the Model.
replicateRagdoll
This item only works when running on the client. ClientCreates and caches a Ragdoll from a model that already has its Constraints constructed.
removeRagdoll
Destroys the ragdoll corresponding to the model and removes it from the cache.
getPlayerRagdoll
Returns the ragdoll corresponding to player's character or nil if there isnt one.
getLocalRagdoll
This item only works when running on the client. ClientReturns the ragdoll coresponding to the local player's character.
activateLocalRagdoll
This item only works when running on the client. ClientRagdollSystem:activateLocalRagdoll() → ()Activates ragdoll physics on the local player's ragdoll.
deactivateLocalRagdoll
This item only works when running on the client. ClientRagdollSystem:deactivateLocalRagdoll() → ()Deactivates ragdoll physics on the local player's ragdoll.
collapseLocalRagdoll
This item only works when running on the client. ClientRagdollSystem:collapseLocalRagdoll() → ()Activates ragdoll physics on the local player's ragdoll, deactivates ragdoll physics after the ragdoll has remained still.