Getting Humanoid from StarterCharacterScripts

In a script under startercharacter scripts, I would like to access the humanoid so I can change accessories. How would I do this?




I am pretty sure you just use script.Parent since it’s in the character.

Whether FindFirstChild or WaitForChild.

Just don’t use the local player if it’s a server script.

@redpandashiba I don’t really get that, you’re getting the humanoids of all players? He was trying to get the humanoid of one player which the script is inside of (StarterCharacterScripts). I don’t get why loop through the players and use PlayerAdded.

1 Like

Quite simple; With the understanding of what StarterCharacterScripts are.
StarterCharacterScripts are loaded into the character when they spawn, so that means-
you can simply do this.
local humanoid = script.Parent:WaitForChild("Humanoid",60)
and it should give you the humanoid. Assuming for some strange reason, it’s not named humanoid, you can check all the children of the character.
local humanoid local children = script.Parent:GetChildren() for i= 1,#children do if children[i]:IsA("Humanoid") then humanoid = children[i] end end

1 Like