New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
0

# How do you get the humanoid from a player? This is all the code I have.

game.Players.PlayerAdded:Connect(function(plr)

end)

0
I tried local char = plr.Character\nlocal hum = char.Humanoid but it didn't work. Cvllapse 30 — 3mo

0
Mr_Unlucky 1064
3 months ago
function onCharacterAdded(Character)
local Humanoid = Character:WaitForChild("Humanoid")
end

end



You can also do

game:GetService("Players").PlayerAdded:Connect(function(Player)
local Humanoid = Character:WaitForChild("Humanoid")
end)
end)


In both examples what we're doing is that we have an event in which every time its fired we get the Player in the parameters in the PlayerAdded event. Afterwards we use the CharacterAdded event with the Player which fires and we get the Character which is in the parameters in the event. We then make a variable which waits for the humanoid to load in and then changes said variable's value into the humanoid.

0
Thank you, this helped a lot. Cvllapse 30 — 3mo
0
No problem! Mr_Unlucky 1064 — 3mo
0
ok this isnt rlly getting the humanoid from the player but u did what he wanted Gameplayer365247v2 729 — 3mo
0
actually it is but okay Mr_Unlucky 1064 — 3mo
local player = game.Players:GetPlayerFromCharacter(from the place you have character in here)