I'm new to scripting & trying to make a gamepass which plays animations on specific chatted messages, but I don't know where I've gone wrong. Nothing showing in output or dev console. Anyone able to help?
service = game:GetService("GamePassService")
gamepass = 000000 --edit this later
player = game.Players
humanoid = player:WaitForChild("Humanoid")
animation = game.Lighting("Animation")
play = humanoid:LoadAnimation(animation)
wait()
game:GetService("Players").PlayerAdded:Connect(function(Player)
Player.Chatted:connect(function(Message)
if Message == "/e test" and
service:PlayerHasPass(player, gamepass) then
play:Play()
end
end)
end)
`

1 comment
From what I've read, it should be playing, unless the Animation isn't loading correctly. Make sure that the animation is either free, or in your inventory.