I would like for an jumpscare animation that I made myself with an monster, but it dosent seem to play at all? I’ve tried to use other methods of playing animations but still wont work? Am I missing something?
local LAnim = hum.AnimationController:LoadAnimation(anim)
LAnim.Looped = true
LAnim:Play()
wait(5)
LAnim:Stop()
Animation = Instance.new("Animation")
Animation.Parent = game.Workspace
Animation.AnimationId = "http://www.roblox.com/asset/?id= "
local OnTouched = game.Players.LocalPlayer
local mouse = game.Players.LocalPlayer.OnTouched:GetMouse()
mouse.KeyDown:connect(function (key)
for i, v in pairs(game.Players:GetChildren()) do
local AnimationTrack = OnTouched.Character.Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
end
end
end)
im pretty sure Humanoid:LoadAnimation() is deprecated, so you should be using Humanoid.Animator:LoadAnimation()
so i believe he should be added an animator object to the humanoid or animation controller then used LoadAnimation(anim) on that animator