The one who advised you needs to be advised himself.
Don’t use polling for waiting for the player’s character.
You can just do this:
local Character = Player.Character or Player.CharacterAdded:Wait()
Also don’t use the parent argument of Instance.new.
Also don’t use Humanoid:LoadAnimation, that has been deprecated, use the Animator object instead. And keep an eye out on the Announcements category daily.