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

RemovePose

This function removes a Pose from the Keyframe by setting its Instance/Parent to nil.

The Pose's Instance/Parent is set to nil, but it is not destroyed. This means, provided the pose is referenced it can be re-parented later.

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

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