Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Locating character from player?

Im using a local script located in starterGUI. I need to acces the humanoid in the player. How do i do it? thanks for helping :)

x = game.Players.LocalPlayer
Humanoid = x:GetPlayerFromCharacter(Humanoid)

P.s i know this is wrong, but im tryna use it as a guide line?

2 answers

✓ Accepted answer

to get the humanoid, you can do the following:

x = game.Players.LocalPlayer
Character = x:WaitForChild("Character")
Humanoid = Character:FindFirstChild("Humanoid")

Hope this helps!

2 comments

0

thanks :)

0

No problem!

You cannot do x:WaitForChild("Character") since it isnt a Child, its a propertie. To access the character you'd do

local Character = x.Character or x.CharacterAdded:wait()

1 comment

0

Property*

This discussion is preserved as it was. New answers, comments, and votes are closed.