Type Index Pages
- BillboardGui
- CanvasGroup
- Frame
- Hint
- ImageButton
- ImageLabel
- PlayerGui
- ScreenGui
- ScrollingFrame
- StarterGui
- SurfaceGui
- TextBox
- TextButton
- TextLabel
- UIAspectRatioConstraint
- UIGradient
- UIGridLayout
- UIListLayout
- UIPadding
- UIPageLayout
- UIScale
- UISizeConstraint
- UITableLayout
- UITextSizeConstraint
- VideoFrame
- ViewportFrame
- ChangeHistoryService
- CoreGui
- DataModelSession
- DockWidgetPluginGui
- MultipleDocumentInterfaceInstance
- Plugin
- PluginAction
- PluginGui
- PluginGuiService
- PluginManager
- PluginMenu
- PluginMouse
- PluginToolbar
- PluginToolbarButton
- QWidgetPluginGui
- Selection
- StandalonePluginScripts
- StatsItem
- StudioService
- StudioTheme
No results found!
-
Instance
- GameSettings
- DebugSettings
- BodyMover
- WeldConstraint
- HttpRbxApiService
- NotificationService
- Translator
- Lighting
- Beam
- GuiService
- UserInputService
- Studio
- Plugin
- HttpService
- Mouse
- BindableEvent
- RunService
- Pages
- Humanoid
- TestService
- PathfindingService
- Chat
- NetworkPeer
- Feature
- CharacterAppearance
- Constraint
- NetworkReplicator
- JointInstance
- Light
- BasePlayerGui
- AnalyticsService
- NetworkMarker
- BinaryStringValue
- FlyweightService
- Geometry
- LoginService
- InstancePacketCache
- ThirdPartyUserService
- TouchInputService
- RuntimeScriptService
- GuidRegistryService
- PartOperationAsset
- DialogChoice
- PhysicsService
- AdService
- TextService
- MarketplaceService
- TeleportService
- Accoutrement
- GamePassService
- AssetService
- InsertService
- PointsService
- ChangeHistoryService
- ServerScriptService
- JointsService
- LogService
- InputObject
- Toolbar
- LuaSettings
- RenderSettings
- AnimationTrack
- PhysicsSettings
- NetworkSettings
- CFrameValue
- Animation
- Color3Value
- BoolValue
- BrickColorValue
- Vector3Value
- AnimationController
- BindableFunction
- Button
- Trail
- LocalizationTable
- LocalizationService
- DebuggerBreakpoint
- DebuggerWatch
- ScriptDebugger
- Animator
- Attachment
- RemoteFunction
- RemoteEvent
- PluginManager
- Camera
- Stats
- Sky
- StarterPlayer
- Dragger
- TerrainRegion
- Path
- TextFilterResult
- Dialog
- StatsItem
- GoogleAnalyticsConfiguration
- ScriptContext
- ControllerService
- CacheableContentProvider
- ReflectionMetadataClasses
- ReflectionMetadataEnums
- DebuggerManager
- GuiBase
- UIBase
- LuaSourceContainer
- GuiItem
- DataModelMesh
- ServiceProvider
- ReflectionMetadataItem
- PostEffect
- PhysicsPacketCache
- TouchTransmitter
- RobloxReplicatedStorage
- Visit
- LuaWebService
- ScriptService
- FlagStandService
- VirtualUser
- SpawnerService
- TimerService
- CookiesService
- Team
- GroupService
- StarterGear
- Message
- PlayerScripts
- Configuration
- ContentProvider
- CollectionService
- Debris
- ReplicatedFirst
- ServerStorage
- ReplicatedStorage
- Folder
- TweenService
- Players
- ContextActionService
- StarterPlayerScripts
- SoundService
- KeyframeSequenceProvider
- VRService
- PluginGuiService
- Player
- Teams
- Pose
- Keyframe
- KeyframeSequence
- IntConstrainedValue
- DoubleConstrainedValue
- ForceField
- RayValue
- Fire
- Smoke
- Sparkles
- ParticleEmitter
- IntValue
- StringValue
- NumberValue
- Explosion
- ObjectValue
- SoundGroup
- UserGameSettings
- ClickDetector
- Sound
- Selection
- BadgeService
- TaskScheduler
- GlobalDataStore
- DataStoreService
- CustomEvent
- CustomEventReceiver
- VirtualInputManager
- FunctionalTest
- TweenBase
- SoundEffect
- ReflectionMetadataEvents
- ClusterPacketCache
- PVInstance
- FaceInstance
- Controller
- ReflectionMetadataCallbacks
- ReflectionMetadataFunctions
- ReflectionMetadataYieldFunctions
- ReflectionMetadataProperties
- ReflectionMetadata
- AdvancedDragger
- HapticService
- FriendService
- GamepadService
No Result Found !!!
AddPose
For thread safety, this property is not safe to read in an unsynchronized thread.
This function adds a Pose
to the Keyframe
by parenting it to the keyframe. It is functionally identical to setting the pose’s Instance/Parent
to the keyframe.
Note, this function will not error when an instance other than a Pose
is given as the pose parameter and will parent it successfully.
Parameters
Name | Type | Default | Description |
---|---|---|---|
|
The |
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
Keyframe Generate Poses
This sample includes a function that will generate a ‘blank’ keyframe containing blank poses for all of the model’s connected parts in the correct hierarchical order.
local function generateKeyframe(model) if not model.PrimaryPart then warn("No primary part set") return end local rootPart = model.PrimaryPart:GetRootPart() if not rootPart then warn("Root part not found") return end local partsAdded = {} partsAdded[rootPart] = true local function addPoses(part, parentPose) -- get all of the joints attached to the part for _, joint in pairs(part:GetJoints()) do -- we're only interested in Motor6Ds if joint:IsA("Motor6D") then -- find the connected part local connectedPart = nil if joint.Part0 == part then connectedPart = joint.Part1 elseif joint.Part1 == part then connectedPart = joint.Part0 end if connectedPart then -- make sure we haven't already added this part if not partsAdded[connectedPart] then partsAdded[connectedPart] = true -- create a pose local pose = Instance.new("Pose") pose.Name = connectedPart.Name parentPose:AddSubPose(pose) -- recurse addPoses(connectedPart, pose) end end end end end local keyframe = Instance.new("Keyframe") -- populate the keyframe local rootPose = Instance.new("Pose") rootPose.Name = rootPart.Name addPoses(rootPart, rootPose) keyframe:AddPose(rootPose) return keyframe end
How this site use cookies
This Platform uses cookies to offer you a better experience, to personalize content, to provide social media features and to analyse the traffic on our site. For further information, including information on how to prevent or manage the use of cookies on this Platform, please refer to our Privacy and Cookie Policy.