:LoadAnimation not working

I’m attempting to make a sword, When I got to the animation part it wouldnt work.
I have tried printing the Humanoid Variable. And yes it prints Humanoid.
There seems to be no issues it just doesnt want to work.

Script Type: Server Script

Script:

--//Defining CanHit

local CanHit = script.Parent.CanHit

--//Defining Parent

local Parent = script.Parent

--//Defining Animation to play later

local Animation = Instance.new("Animation")
Animation.Parent = script.Parent
Animation.AnimationId = "rbxassetid://5790806333" --Sword Animation

--//Defining Character

local Player = script.Parent.Parent.Parent
local Humanoid = Player.Character.Humanoid

--//Loading Animation
wait(1.2) --//Added wait due to error, Humanoid didnt load in completely causing bugs.

print(Humanoid) --//Returns Humanoid

local LoadedAnimation = Humanoid:LoadAnimation(Animation)

print(LoadedAnimation) --//Returns Animation

--//Making a Hit function, this will be the main function. We will call it later when we need it

function Hit()	
	if Player.Name == "brodywth" then
	LoadedAnimation:Play() 
	print(Player) --//For now prints the Player.
else Player:Kick("Dont use admin to get tools")
		
end end

--//Making a function that will toggle CanHit.

function AllowHit()
CanHit.Value = true	
end

--//Making a function that will toggle CanHit, this time it will turn off
function NotAllowHit()
CanHit.Value = false	
end

--//Event Listeners

Parent.Equipped:Connect(AllowHit)
Parent.Unequipped:Connect(NotAllowHit)
Parent.Activated:Connect(Hit)

Can you do something like this for the code to make it more readable?

code
Image showing what to type to do it

Screen Shot 2020-10-05 at 2.31.01 PM
this ` not this ’

Thank you! I edited the post, it should be more readable.

No longer need help, admins close thread please.

By the way the solution was I was loading an R15 animation on an R6 Rig.