I was trying to make a spell script (newish to scripting) and I have the chatted event perfect, I just need the script to be global for the chatted event.
Here's what I have:
game.Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(msg) if msg == "Fus Ro Dah" or "fus ro dah" or "frd" or "FUS RO DAH" then print("spell used: fus ro dah") local animation = Instance.new("Animation") animation.AnimationId = "http://www.roblox.com/Asset?ID=1788538969" -- your id here local animTrack = player.Character.Humanoid:LoadAnimation(animation) -- chanhe Humanoid to the target's Humanoid animTrack:Play() end end) end)
It prints my output, no errors or anything for the animation part though.