#Walk animation wont show if theres a humanoid in a npc
1 messages · Page 1 of 1 (latest)
are u using an AnimationController or the animator from Humanoid
cus u have to use the Animator when there is a humanoid
** You are now Level 1! **
this is the script with all the data
the part with the aniamtionController
ok
not the whole code
wait a min
kk
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"
},
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
Lebron James caught using the 2nd Argument in Instance.new()
whats the porblem
I use it too
it saves lines
From what i remember correctly, its more slower than just parenting it
Ill search it later
Scripters trying to save one picoseconds: 💔
ok but what do i do
one minute
ok
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
u gotta get the humanoid btw
errors?
hmm
ill try with the og code
one sec
the og code works fine
mmmm
nope
i dont know man
wheres should i see
._.
oh
** You are now Level 2! **
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
