Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Defining humanoid after character?

Asked by 7 years ago

Going with my previous post, I did what I was told, now I'm a bit stuck as to how to define humanoid after defining char.

local char = ply.Character or ply.CharacterAdded:wait()

Tried this,

local hum = char.Humanoid or char:WaitForChild('Humanoid')

1 answer

Log in to vote
0
Answered by
soved 69
7 years ago

Just use:

local Hum = Char:WaitForChild("Humanoid")

You want to make sure it is there. And if it is not, just wait for it. If I were you I'd use :WaitForChild() wherever you can.

I wish you luck with whatever you're doing,

soved

0
It's weird that it didn't work before, thank you for clarifying. MexicanGod13 6 — 7y
Ad

Answer this question