Properties
Animation
[ReadOnly]
[NotReplicated]
|
The |
bool
[ReadOnly]
[NotReplicated]
|
A read only property that returns true when the |
float
[ReadOnly]
[NotReplicated]
|
A read only property that returns the length (in seconds) of an |
bool
|
This property sets whether the animation will repeat after finishing. If it is changed while playing the result will take effect after the animation finishes. |
AnimationPriority
|
This property sets the priority of an |
float
[ReadOnly]
[NotReplicated]
|
The Speed of an |
float
[NotReplicated]
|
Returns the position in time in seconds that an |
float
[ReadOnly]
[NotReplicated]
|
WeightCurrent is a read-only property that gives the current weight of the |
float
[ReadOnly]
[NotReplicated]
|
WeightCurrent is a read-only property that gives the current weight of the |
bool
|
Determines if an |
string
[ReadOnly]
[NotReplicated]
|
A read-only string representing the class this |
int
[ReadOnly]
[NotReplicated]
[Deprecated]
|
The cost of saving the instance using data persistence. |
string
|
A non-unique identifier of the |
Instance
[NotReplicated]
|
Determines the hierarchical parent of the |
bool
|
A deprecated property that used to protect |
bool
[Hidden]
[NotReplicated]
[Deprecated]
|
string
[ReadOnly]
[NotReplicated]
[Deprecated]
|
Functions
void
|
This function changes the |
void
|
Changes the weight of an animation, with the optional fadeTime parameter determining how long it takes for |
RBXScriptSignal
|
This function returns an |
double
|
Returns the time position of the first |
void
|
Plays the |
void
|
Stops the |
void
|
This function destroys all of an |
Instance
|
Create a copy of an object and all its descendants, ignoring objects that are not |
void
|
Sets the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first child of the |
Instance
|
Variant
|
Returns the attribute which has been assigned to the given name |
RBXScriptSignal
|
Returns an event that fires when the given attribute changes |
Dictionary
|
Returns a dictionary of string → variant pairs for each of the |
Objects
|
Returns an array containing all of the |
string
[NotBrowsable]
|
Returns a coded string of the |
Array
[CustomLuaState]
|
Returns an array containing all of the descendants of the instance |
string
|
Returns a string describing the |
RBXScriptSignal
|
Get an event that fires when a given property of an object changes. |
bool
[CustomLuaState]
|
Returns true if an |
bool
|
Returns true if an |
bool
|
Returns true if an |
void
[Deprecated]
|
Sets the object’s Parent to nil, and does the same for all its descendants. |
void
|
Sets the attribute with the given name to the given value |
Instance
[CustomLuaState]
[CanYield]
|
Returns the child of the |
Objects
[Deprecated]
|
Returns an array of the object’s children. |
Instance
[Deprecated]
|
void
[Deprecated]
|
Instance
[Deprecated]
|
Objects
[Deprecated]
|
bool
[Deprecated]
[CustomLuaState]
|
bool
[Deprecated]
|
void
[Deprecated]
|
Events
RBXScriptSignal
|
This event fires when an |
RBXScriptSignal
|
Fires every time playback of an |
RBXScriptSignal
|
Fires whenever the |
RBXScriptSignal
|
Fires when the |
RBXScriptSignal
|
Fires whenever an attribute is changed on the |
RBXScriptSignal
|
Fired immediately after a property of an object changes. |
RBXScriptSignal
|
Fires when an object is parented to this |
RBXScriptSignal
|
Fires when a child is removed from this |
RBXScriptSignal
|
Fires when a descendant is added to the |
RBXScriptSignal
|
Fires immediately before a descendant of the |
RBXScriptSignal
[Deprecated]
|
Code Samples
Animation Creation
This sample creates an Animation, with an AnimationId. It then creates an AnimationTrack by loading the Animation onto a character’s Humanoid, before playing it.
local Players = game:GetService("Players")
local player = Players:FindFirstChild("Builderman")
local character = player.Character
local humanoid = character:FindFirstChild("Humanoid")
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=507771019" -- Roblox dance emote
local animationTrack = humanoid:LoadAnimation(animation)
animationTrack:Play()