Hello, so I am new to the animations and I am trying to play an animation on a character i imported from blender but it is not playing and here is the code(It’s a server script):
local bhum = script.Parent:WaitForChild("Humanoid")
local animId = "rbxassetid://11051693426"
local jumpscareanim0 = Instance.new("Animation")
jumpscareanim0.AnimationId = animId
local jumpscareanim = bhum.Animator:LoadAnimation(jumpscareanim0)
jumpscareanim.Priority = Enum.AnimationPriority.Action
jumpscareanim.Looped = true
jumpscareanim:Play()
I tried many ways and none of them worked
local function playAnimationFromServer(character, animation)
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
-- need to use animation object for server access
local animator = humanoid:FindFirstChildOfClass("Animator")
if animator then
local animationTrack = animator:LoadAnimation(animation)
animationTrack:Play()
return animationTrack
end
end
end
Animator (roblox.com)
Also give errors of output in your message
It does not give any errors in output
try what i sent must be work for the moment
It doesn’t work either, and again there aren’t any errors in output