PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetPoses

This function returns an array containing all Poses that have been added to a Keyframe. This is functionally the same as using the Instance/GetChildren function on the Keyframe.

Note, this function will return all children of the Keyframe, including non Poses if any are present.

Returns

Return Type Summary

An array of Poses.


Code Samples


Keyframe Reset Poses

This code sample includes a function to reset the CFrame of the Poses in a Keyframe.

    local function resetPoses(parent)
    	-- both functions are equivalent to GetChildren
    	local poses = parent:IsA("Keyframe") and parent:GetPoses() 
    		or parent:IsA("Pose") and parent:GetSubPoses()
    
    	for _, pose in pairs(poses) do 
    		if pose:IsA("Pose") then
    			pose.CFrame = CFrame.new()
    			-- recurse
    			resetPoses(pose)
    		end
    	end
    end