Animation not playing in roblox servers

As the title says my animation won’t play in roblox servers, but it works in studio testing. I uploaded it yesterday, don’t know what could be wrong, this is my script:
local npc = script.Parent.Parent
local humanoid = npc:WaitForChild(“Humanoid”)

local animfolder = npc:WaitForChild(“Folder”)
local guitaranimation = animfolder:WaitForChild(“guitar”)

local animation = humanoid:LoadAnimation(guitaranimation)

local play = script.Parent.Parent.Parent.Play
local stop = script.Parent.Parent.Parent.Stop

play.Event:Connect(function()

wait(.35)

animation:Play()

end)

stop.Event:Connect(function()

animation:Stop()

end)

Change “local animation = humanoid:LoadAnimation(guitaranimation)” to
local animation = humanoid.Animator:LoadAnimation(guitaranimation)
this way animations replicates even when ran from the client.

For the “play” and “stop” variable do
script.Parent.Parent.Parent:WaitForChild(“Play”),
and script.Parent.Parent.Parent:WaitForChild(“Stop”) to make sure they’ve loaded.

It still doesn’t play in game unfortunately

The animation needs to pass moderation and the game owner (player/group) must be granted permission to use it for animations to work in a game server. Do you see an error in the developer console regarding that animation?

Wow don’t know how that error slipped past me, got a sanitized ID error. I fixed it now, thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.