How to fix : Humanoid is not a valid member of Workspace
and
Infinite yield possible on 'Workspace:WaitForChild("Humanoid")
As per your one line script, WaitForChild searches the workspace until it finds it. In fact WaitForChild will keep searching until it is added. To fix this, use FindFirstChild()
Oh by the way, it also means that Humanoid isn't in workspace.