#Walk animation wont show if theres a humanoid in a npc

1 messages · Page 1 of 1 (latest)

sonic coral
#

for some reason the npc wont show the walking animation if theres a humanoid

hybrid dawn
#

are u using an AnimationController or the animator from Humanoid

#

cus u have to use the Animator when there is a humanoid

sonic coral
#

AnimatorController

#

how do i migrate

#

because its not my script

hybrid dawn
#

just get the part wher it has the AnimatorController

#

Ill tell u

sonic coral
paper lionBOT
#

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

sonic coral
#

this is the script with all the data

hybrid dawn
#

the part with the aniamtionController

sonic coral
#

ok

hybrid dawn
#

not the whole code

sonic coral
#

wait a min

hybrid dawn
#

kk

sonic coral
#

local AnimationController = Instance.new("AnimationController", Thing)
local Animator = Instance.new("Animator", AnimationController)

local ThingConfiguration = Instance.new("Configuration")
ThingConfiguration.Parent = Thing

local AnimationsFolder = Instance.new("Folder")
AnimationsFolder.Name = "Animations"
AnimationsFolder.Parent = ThingConfiguration

local WalkTrack
if Configuration.WalkAnimation and Configuration.WalkAnimation ~= "" then
    local WalkAnimation = Instance.new("Animation")
    WalkAnimation.Name = "WalkAnimation"
    WalkAnimation.AnimationId = Configuration.WalkAnimation
    WalkAnimation.Parent = AnimationsFolder

    WalkTrack = Animator:LoadAnimation(WalkAnimation)
end

if WalkTrack then WalkTrack:Play() end

local WaypointRotationTween
local WaypointMoveTween
#

["Bacon"] = {
Rarity = "Super Common",
Price = 15,
MoneyPerSecond = 10,

    Icon = "rbxassetid://84582517751044",

    IdleAnimation = "rbxassetid://507766666",
    WalkAnimation = "rbxassetid://507777826",
    CarryAnimation = "rbxassetid://71720976335931"
},
hybrid dawn
#

local Animator: Animator = Humanoid:WaitForChild("Animator")
local animation = Instance.new("Animation")
animation.AnimationId = AnimationId

local Track: AnimationTrack = Animator:LoadAnimation(animation)
Track:Play()
#

its basically this

#

u just gotta chnage the concepts now

sonic coral
#

where do i put that

#

how

stuck storm
hybrid dawn
#

I use it too

#

it saves lines

stuck storm
stuck storm
#

Scripters trying to save one picoseconds: 💔

sonic coral
#

ok but what do i do

hybrid dawn
#

one minute

sonic coral
#

ok

hybrid dawn
#

local Animator: Animator = Humanoid:WaitForChild("Animator")

local ThingConfiguration = Instance.new("Configuration")
ThingConfiguration.Parent = Thing

local AnimationsFolder = Instance.new("Folder")
AnimationsFolder.Name = "Animations"
AnimationsFolder.Parent = ThingConfiguration

local WalkTrack
if Configuration.WalkAnimation and Configuration.WalkAnimation ~= "" then

     local WalkAnimation = Instance.new("Animation")
     WalkAnimation.Name = "WalkAnimation"
     WalkAnimation.AnimationId = Configuration.WalkAnimation
     WalkAnimation.Parent = AnimationsFolder

     WalkTrack = Animator:LoadAnimation(WalkAnimation)
end
if WalkTrack then WalkTrack:Play() end

local WaypointRotationTween
local WaypointMoveTween

#

try this

sonic coral
#

kk

#

wait

hybrid dawn
#

u gotta get the humanoid btw

sonic coral
#

uhhh

#

XD

hybrid dawn
#

errors?

sonic coral
#

yup

#

they are supposed to be walking the line

hybrid dawn
#

send the output bruh

#

i cant just guess

sonic coral
#

im in it

#

wait

hybrid dawn
#

the error is somwwhere else

#

its something that doesnt exists btw

sonic coral
#

hmm

#

ill try with the og code

#

one sec

#

the og code works fine

#

mmmm

#

nope

#

i dont know man

#

wheres should i see

stuck storm
sonic coral
#

._.

stuck storm
#

and place it in the humanoid

#

and then use tracks n shit

sonic coral
#

oh

paper lionBOT
#

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

sonic coral
#

lemme see

#

local Animator: Animator = Humanoid:WaitForChild("Animator")

local ThingConfiguration = Instance.new("Configuration")
ThingConfiguration.Parent = Thing

local AnimationsFolder = Instance.new("Folder")
AnimationsFolder.Name = "Animations"
AnimationsFolder.Parent = ThingConfiguration

local WalkTrack
if Configuration.WalkAnimation and Configuration.WalkAnimation ~= "" then

    local WalkAnimation = Instance.new("Animation")
    WalkAnimation.Name = "WalkAnimation"
    WalkAnimation.AnimationId = Configuration.WalkAnimation
    WalkAnimation.Parent = AnimationsFolder

    WalkTrack = Animator:LoadAnimation(WalkAnimation)
end
if WalkTrack then WalkTrack:Play() end

local WaypointRotationTwe
#

this is the script

#

but it doesnt do the walk anim