#Animation not playing with no error

1 messages · Page 1 of 1 (latest)

cloud cradle
#

I have been trying to just play a simple animation on the player but i dont understand what i am doing wrong.
I made a simple animation and i made sure to:

  1. set priority to "Action"
  2. upload the animation to roblox
  3. paste the ID inside of a animation instance.
  4. have the local script in "starter player scripts"

In my script im trying to load and play the animation on the local players humanoid. No error pops up but the player just doesnt play the animation, or maybe it does and its just not moving the player.

i will provide the script underneath

#
player = game:GetService("Players").LocalPlayer
character = player.Character or player.CharacterAdded:Wait()
humanoid = character:WaitForChild("Humanoid")

task.wait(2)

track = humanoid.Animator:LoadAnimation(script.Animation)
track:Play()
print("played")
#

it prints "played" with no issue but the animation isnt moving the player

dense dew
#

you need to make a animation instance

#

lemme fix it and provide it for u

cloud cradle
#

i think i know what you mean, let me try it out

dense dew
#

bet

cloud cradle
# dense dew bet
player = game:GetService("Players").LocalPlayer
character = player.Character or player.CharacterAdded:Wait()
humanoid = character:WaitForChild("Humanoid")

animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://117334367834890"

track = humanoid.Animator:LoadAnimation(animation)
track.Priority = Enum.AnimationPriority.Action

task.wait(2)

track:Play()
print("played")
#

is this what you mean? it unfortunately still doesnt work like this

dense dew
#

lemme see

#

i would define the animator tbh

deft lanceBOT
#

studio** You are now Level 1! **studio

dense dew
#
local Players = game:GetService("Players")

local player = Players.LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
local Humanoid: Humanoid = Character:WaitForChild("Humanoid")

local Animator = Humanoid:FindFirstChildOfClass("Animator")
if not Animator then
    Animator = Instance.new("Animator")
    Animator.Parent = Humanoid
end
#

oh and also

#

i think i know why

#

you see, roblox has been changing the R6 lately, so the new characters need to be changed, thus, you need to get a r6 dummy from the toolbox or make a new animation using ur own imported character with the new r6 they use

#

it has bugged a lot of games because of this change, it's annoying but what can we do tbh

#

join vc, lemme show u what i mean

cloud cradle
#

does the r6 block avatar from the built in rig builder not work?

deft lanceBOT
#

studio** You are now Level 1! **studio

dense dew
cloud cradle
#

SetDate helped me solve this issue, for anyone who is having the same problem:

  1. Create a new rig (r6 or r15 depending on your animations)
  2. rename your rig to "StarterCharacter"
  3. place your rig inside of "StarterPlayer"
    and thats it!
    the only issue is that your character is now a blank avatar but apparently you can use the players character description and apply that to the blank avatar.
fathom dune
#

this is the script i use for animation of my npc

#
local ShopNPC = workspace:WaitForChild("shopKeeper")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ShopAnim = ReplicatedStorage.Anims:WaitForChild("IdleAnim")

local animator = ShopNPC.Humanoid:WaitForChild("Animator")
local animationTrack = animator:LoadAnimation(ShopAnim)

animator.Parent = ShopNPC.Humanoid
animationTrack.Looped = true
animationTrack:Play()
#
local ShopAnim = ReplicatedStorage.Anims:WaitForChild("IdleAnim")
#

this is just an animation instance in replicated storage

cloud cradle
fathom dune
#

use this

#

for animating players

cloud cradle
#

yeah thats for like locomotion animations which worked for me but i was trying to make like action animations