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

Whats the variable for the player's humanoid?

I want a variable that can be easy to access the players health and walkspeed...

2 comments

0

The humanoid is in of itself a c++ instance variable. If you want to reference it just make a new Lua variable.

0

local myHumanoid = game.Players.Player1.Character.Humanoid;

1 answer

The humanoid, assuming you have the player in game.Players, can be found in

local player = <whatever>
local humanoid = game.Players.player.Character.Humanoid

Then, you can go ahead and do things like

humanoid.Walkspeed = 0
humanoid.Health = 10
humanoid.MaxHealth = 500

And so on and so forth.

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