This is my first time scripting and I would like to know how I could make an idle animation.
How would I make an idle animation? This is my first time scripting.
2 answers
I did some research, and I believe you can use GetPropertyChangedSignal on the character, which can detect if a specified property of the character has changed, i.e velocity.
I saw someone else say this before but you could detect if the character's velocity is less than a number, and if it is, play the animation.
player.Character.Torso:GetPropertyChangedSignal('Velocity'):Connect(function()
if player.Character.Torso.Velocity < 5 then
-- play animation
end
end)
Saw this off a devforum. (I hope I'm still allowed to post it?)
7 comments
In what script would I put this in? Local, module, or Script? Sorry if I sound dumb.
or Humanoid.Running:Connect(function(speed) end)
Thank you for helping! I have it done.
Yay! No problem! You should probably add some wait()'s in the script so the animation doesn't play every time the player stops moving, only when they stop moving for 20 seconds or something.
pojoto my idle animation is like the cartoony r15 animation, it's mainly supposed to be there.
Also, how would i get these to save so that when i go in and out of game they're still there?
Hmmm? I'm not quite sure I understand. This code will always run when a player's velocity is changed, there's no need to 'save' or anything.
Edit the Animate script. You can do that by starting up a play solo game in studio, then going to your character model and opening up the localscript Animate. Copy and paste that script into StarterCharacterScripts.
Inside the script, there is a table animNames. Inside the table, the first element is an element with the key idle. The value is a table of tables. Each table is a table that consists of the properties id, which has the value of the asset id for the animation, and then another property weight which you can read more about here.
All you have to do is add a table to the list consisting of your roblox asset id and weight and you will automatically perform the animation randomly when your player is idle.
local animNames = {
idle = {
{ id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766388", weight = 9 },
{ id = "YOUR ASSET ID", weight = yourWeight }
},
walk = {
-- rest of script
Hope this helps! :)
1 comment
Thank you for helping me!
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
for a tool?
no, just for when a character stops moving
Sure, but if you do know please do tell
I believe you could check the Humanoid.MoveDirection = 0,0,0. I'm not entirely sure though.
Sorry I misunderstood what you were trying to accomplish, I'd suggest trying pojoto's idea.
Mythical, i tried that video's idea and my character didnt have an animation for anything, ill try Pokoto's idea right now.