So I had this error. If this question was already posted can you please tell me. Here is my code. I know I spelled something wrong. I updated my script based on the solution I was given but my animation isn't playing. Also want to thanks phxntxsmic, and JustinWe12 for trying to help me.
local ExcaliburAnimation = script["ExcaliburAnimation"]
local player = game.Players.LocalPlayer
if not player.Character then
player.CharacterAdded:Wait()
end
local char = player.Character
repeat
char = player.Character
wait()
until player.Character ~= nil
local humanoid = char.Humanoid
local ExcaliburAnimationTrack = humanoid:LoadAnimation(ExcaliburAnimation)
ExcaliburAnimationTrack:Play()

2 comments
local ExclaburAnimationTrack = humanoid:LoadAnimation(ExcaliburAnimation) ExcaliburAnimationTrack:Play()
That's what I did