#I need help, I’ve been working on this animation script but it’s not working

33 messages · Page 1 of 1 (latest)

lusty blade
#

I’ve been working on this script for 3 days no idea what I’m doing wrong

#

Not sure if I maybe put something in the wrong place? The animation im trying to make work is the spawnAnimation

junior lotus
#

well looks pretty obvious

#

you see nothing wrong for the id

#

there is two ids concatenating

#

you can remove the ..tostring(animationId)

lusty blade
lusty blade
junior lotus
#

just that part

#

what you are doing here is have 2 animation ids in one

lusty blade
#

Oh okay!

#

I just removed and ran it, it’s still not working

#

Have I maybe put something in the wrong place?

slate plazaBOT
#

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

lusty blade
#

This is the animation I’m trying to get to work

junior lotus
#

can you copy paste the script so i can write it and then explaining

lusty blade
lusty blade
#

local animationId = "rbxassetid://15960873921"
local char = script.Parent
local animController = char:FindFirstChildOfClass("Humanoid") or char:FindFirstChildOfClass("AnimationController")

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

local animTrack = animController:LoadAnimation(animation)
animTrack:Play(0, 1, 1)

junior lotus
#
local char = script.Parent
local animator = char:FindFirstChild("Humanoid").Animator 

local animation = Instance.new("Animation")
animation.Parent = char
animation.AnimationId = "rbxassetid://15960873921"

local animTrack = animator:LoadAnimation(animation)
animTrack:Play()
#

when you are creating an instance it should always have a parent and instead of using the animation controller use the animator inside the humanoid

#

make sure there is an animator in your humanoid*

lusty blade
#

there is, and alright thank you, ill note that down and move the animation into the humanoid

#

do i delete the animation controller then?

junior lotus
#

yes you can

#

and you do not need the animation anymore too since in this script, you are creating a new one witht he same id

lusty blade
#

you are the best person ive ever met

junior lotus
lusty blade
#

can i hire you 😭

junior lotus
#

no sorry im not for hire

lusty blade
#

aw alright but thanks anyway! youve helped me a ton!