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

RemoveSubPose

This function removes a sub Pose from the Pose by parenting it to nil. It is functionally identical to setting the new pose’s Instance/Parent to nil.

Note, this function will not error when an instance other than a Pose is given as the pose parameter and remove it successfully.

Parameters

Name Type Default Description

The Pose to be removed.

Returns

Return Type Summary

Code Samples


Keyframe Add/Remove Pose

This sample demonstrates quickly the Keyframe.AddPose, Keyframe.RemovePose and Pose.AddSubPose and Pose.RemoveSubPose functions. Note these are functionally equivalent to parenting and un-parenting the poses.

local keyframe = Instance.new("Keyframe", workspace)

local pose = Instance.new("Pose")
pose.EasingStyle = Enum.PoseEasingStyle.Cubic
pose.EasingDirection = Enum.PoseEasingDirection.Out
local pose2 = Instance.new("Pose")
pose2.EasingStyle = Enum.PoseEasingStyle.Cubic
pose2.EasingDirection = Enum.PoseEasingDirection.Out

keyframe:AddPose(pose) -- pose.Parent = keyframe

wait(2)

keyframe:RemovePose(pose) -- pose.Parent = nil 

wait(2)

keyframe:AddPose(pose) -- pose.Parent = keyframe

wait(2)

pose:AddSubPose(pose2) -- pose2.Parent = pose

wait(2)

pose:RemoveSubPose(pose2) -- pose2.Parent = nil