#Print outputs but the animation doesnt play

1 messages · Page 1 of 1 (latest)

silk veldt
#
local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid)

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://136075368851428"
local track = animator:LoadAnimation(animation)

script.Parent.Activated:Connect(function()
    if not track.IsPlaying then 
        track:Play() 
        print("Animation playing")
    end 

end)

script.Parent.Unequipped:Connect(function() 
    if track.IsPlaying then 
        track:Stop() 
    end
end)
#

Print outputs but the animation doesnt play

fresh flicker
#

is this in a local script or script?

snow houndBOT
#

studio** You are now Level 2! **studio

fresh flicker
#

also, make sure everything is updated when the player dies/respawns

silk veldt
faint blaze
#

? ???

#

like animation isnt like able to be accessed

#

or sum shi

silk veldt
# faint blaze any errors

none, everything works the animation doesnt play, ive checked that the id is correct, im positive its owned by me, and so is the game, every common issue has been checked

#

im quite confused

mint crypt
#

what the hell

#

just wait for the animator

#

only one of them will work

silk veldt
mint crypt
#

you are supposed to wait it

#

it will always be there

faint blaze
#

oh wait

#

i just noticed

mint crypt
#

it's default roblox

faint blaze
#

hes finding for the animator without waiting

#

eureka!

mint crypt
#

🥀

faint blaze
#

:WaitForChild() or some shi idk

silk veldt
#

animation.Parent prints

silk veldt
#

as Animator

mint crypt
#
local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://136075368851428"
local track = animator:LoadAnimation(animation)

script.Parent.Activated:Connect(function()
    if not track.IsPlaying then 
        track:Play() 
        print("Animation playing")
    end 

end)

script.Parent.Unequipped:Connect(function() 
    if track.IsPlaying then 
        track:Stop() 
    end
end)
#

it aint that deep

silk veldt
#

but gimmie 1 sec ill add that change! Thanks! i dont do much with animations, ive used em once on a veryyy simple project, and that was before you needed an animator and could just load it to the humanoid

mint crypt
#

since animator doesn't need a humanoid

#

it can be any object

silk veldt
#

yeah lowkey seems awesome for animating NPCs n such

mint crypt
#

ye

silk veldt
#

🙏

#

okay so someone made the keyframe sequence for me, i paid him for a couple animations, i then opened those animations in the animation editor, and published them to roblox, that is where i go my animationID, did i get somethign wrong? @mint crypt

mint crypt
#

also

#

what is the context here

#

local script or serve script?

#

actually local player yeah

#

is this a tool script?

silk veldt
#

yeah

mint crypt
#

maybe weight is too low

#

set the weight higher

silk veldt
mint crypt
#

as a scripter

#

:Play(fadeTime, weight, speed)

silk veldt
#

such a basic ass system for this many issues

mint crypt
silk veldt
#

word

#

same thing

mint crypt
mint crypt
#

animator:GetPlayingAnimations()

#

and print it

silk veldt
mint crypt
silk veldt
#

lemme give this a name rq

#

i think its that 3rd index

silk veldt
mint crypt
#

I know it sounds stupid

#

but trust

silk veldt
#

wait

#

is toolNoneAnim

#

overwriting this

mint crypt
#

I think it is

silk veldt
#

w the default roblox hold animation

mint crypt
silk veldt
#

weight = math.huge

mint crypt
#

that wont work

#

lol

silk veldt
#

ik im playing dw

#

😭

mint crypt
silk veldt
#

did 100k n nun

#

lemme set the priority to action4 rq

mint crypt
silk veldt
mint crypt
#

I seriously think the animation is just empty

#

replace it with walk or smt

silk veldt
silk veldt
#

i saved it 3 dif times

#

bc i felt unsure too

mint crypt
#

is the animation r6 or r15

silk veldt
#

r6, i force r6 in the avatar settings

mint crypt
#

but you rcharacter is clearly r15

silk veldt
#

does the avatar not change in-studio?

mint crypt
#

also avatar settings are wonky af

silk veldt
#

can i force r6 w a script?

mint crypt
#

it allows you to use r6 on r15 characters

mint crypt
#

do it avatar settings

mint crypt
#

@silk veldt

silk veldt
#

the setting i had set to r6 only was animations

mint crypt
#

yep

#

pretty confusing

#

anyways I think this will work

#

you're welcome

silk veldt
#

@mint crypt my man i appriciate you, il lremember this when i work with animations in the future! I appriciate you helping light my path towards learning and hopefully someday success!

#

i wish you the best of luck

mint crypt
faint blaze
#

😭

#

oh wait

#

nvm

#

it was already fixed

#

LOL