Hello, the lost people,
I am trying to make a simple animate script. But I need help with making it play animation on jump. Hope you guys can help
Code
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local animations = {
Idle = humanoid:LoadAnimation(humanoid:WaitForChild("Idle")),
Walk = humanoid:LoadAnimation(humanoid:WaitForChild("Walk")),
Jump = humanoid:LoadAnimation(humanoid:WaitForChild("Jump"))
}
humanoid.Running:Connect(function(speed)
if speed > 0.2 then
animations["Walk"]:Play()
animations["Idle"]:Stop()
else
animations["Walk"]:Stop()
animations["Idle"]:Play()
end
end)
humanoid.Jumping:Connect(function(active)
-- I want to make the animation play from here
end)
animations["Idle"]:Play()