my anim is not playing even though i own it.
here’s my code:
module.playClient = function(st, id, priority, speed, hum, server)
local char = hum and hum.Parent or game.Players.LocalPlayer.Character
local plr = game.Players:GetPlayerFromCharacter(char)
st = returnSkinNameIfAnim(plr, id, st)
local anim
local found = false
if not an[char] then
an[char] = {}
end
if not an[char][st] then
an[char][st] = {}
end
if an[char][st][id] then
anim = an[char][st][id]
found = true
end
if not found then
local hum = hum or char.Humanoid
if not hum:IsDescendantOf(workspace) then warn("humanoid not descendant of workspace") return end
anim = Instance.new("Animation")
local num
if typeof(module.anims[st][id]) == "table" then
num = module.anims[st][id][math.random(1,#module.anims[st][id])]
else
num = module.anims[st][id]
end
if not num then warn("anim not found for stand " .. st) return end
anim.AnimationId = server and num.AnimationId or "rbxassetid://".. num
anim.Name = server and st.."-"..id or "anim"
anim = hum:LoadAnimation(anim)
an[char][st][id] = anim
end
if priority then
anim.Priority = priority
end
if anim then
anim:Play(nil, nil, speed or 1)
end
return anim
end
module.playServer = function(plr, id, priority, speed, hum)
local char = hum and hum.Parent or plr and plr.Character
local st = module.getStand(char)
if plr then
st = returnSkinNameIfAnim(plr, id, st)
end
local anim
local found = false
if not an[char] then
an[char] = {}
end
if not an[char][st] then
an[char][st] = {}
end
if an[char][st][id] then
anim = an[char][st][id]
found = true
end
if not found then
local hum = hum or char.Humanoid
if not hum:IsDescendantOf(workspace) then warn(“humanoid not descendant of workspace”) return end
anim = Instance.new(“Animation”)
local num
if typeof(module.anims[st][id]) == “table” then
num = module.anims[st][id][math.random(1,#module.anims[st][id])]
else
num = module.anims[st][id]
end
if not num then warn(“anim not found for stand " … st) return end
anim.AnimationId = num.AnimationId or “rbxassetid://”… num
anim.Name = st…”-"…id or “anim”
anim = hum:LoadAnimation(anim)
an[char][st][id] = anim
end
if priority then
anim.Priority = priority
end
if anim then
anim:Play(nil, nil, speed or 1)
end
return anim
end
module.play = function(st, id, priority, speed, hum, server)
if type(st) == “table” then
hum = st[5]
server = st[6]
speed = st[4]
I forgot about this post sorry. It turns out this bug was not to do with my scripting and was pure foolishness. I had kept the humanoid inside of the stand model thus it would not play.