Collapse Sidebar


This function removes a Keyframe from the KeyframeSequence by setting its parent to nil. It is functionally identical to setting the keyframe’s parent to nil

The Keyframe’s parent is set to nil, but it is not destroyed. This means, provided the keyframe is referenced it can be re-parented later.

Note, this function will not error when an Instance other than a Keyframe is given as the keyframe parameter.


Name Type Default Description

The Keyframe to be removed.


Return Type Summary

Code Samples

KeyframeSequence RemoveKeyframe

This sample adds a Keyframe to a KeyframeSequence before removing it and adding it again. Note that once a Keyframe is removed it is not destroyed, meaning it can be re-added later.

-- create the keyframesequence
local keyframeSequence = Instance.new("KeyframeSequence")
keyframeSequence.Parent = workspace 

-- create a keyframe
local keyframe = Instance.new("Keyframe")

-- add the keyframe 


-- remove the keyframe