Hello.
I’m trying to get the player’s humanoid for my script with a single variable, but it won’t work. Here’s what I did…
local Player = game:GetService("Players").LocalPlayer;
local Character = Player.Character or Player.CharacterAdded:Wait();
local Humanoid = Character.Humanoid or Character:FindFirstChild("Humanoid") or Character:WaitForChild("Humanoid");
Humanoid.Died:Connect(function()
print("Died.");
end);
Here’s the output…
Humanoid is not a valid member of Model "Workspace.HATETOALL"
I literally added Character:WaitForChild(), Character:FindFirstChild() and Character.Humanoid all three in one variable, yet it doesn’t seem to work.
(Running this through a localscript in StarterPlayerScripts)