It says there is a problem on line 4 but I cant seem to find the problem
(If you couldn’t tell I’m trying to code my animations,so when I click a key it plays the animation)
This is likely because the Character has not loaded properly yet therefore Humanoid is not a valid member of the Character. In order to fix this, you can do the following:
local char = player.Character
local human = char:WaitForChild("Humanoid") -- waits for the humanoid to load before advancing the script
Ah, I figured out the issue. It’s the folder you’ve got it in. You have it in StarterPlayerScripts, which is why this is not working. I recommend you place this in StarterCharacterScripts or StarterGui and include the code I gave above and this will work.