Hello. I am having a problem with this script.
Whenever I try to play the animation in Roblox Studio, it works. When it is in the normal game, it does not work. The script works until the "track:Play()" section.
It is a global script located in ServerScriptService.
game.ReplicatedStorage.PlayAnim.OnServerEvent:Connect(function(plr)
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://ID"
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
local track = hum:LoadAnimation(Anim)
print(plr.Name.." tries to play Anim!")
track:Play()
end)

3 comments
hmmmm...
Try doing it locally?
Do you have the player defined?