I’ve been trying to script my animations recently and I’ve run into a problem
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)
June 12, 2020, 8:48pm
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
Thank you Legend for responding but
I tried what you said and it still didn’t work.If you have any other suggestions please let me
June 12, 2020, 9:01pm
Did you get anything in the output when you tried this?
June 12, 2020, 9:14pm
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
StarterGui and include the code I gave above and this will work.
Thank you so much Lengend!