#how to i get a humanoid from a players char
103 messages · Page 1 of 1 (latest)
try this
local player = game.Players.LocalPlayer
local character = player.CharacterAdded:Wait()
** You are now Level 1! **
idk if it's gonna work im a noob at scripting
but to get the character from a player this worked for me
replace the 2nd line with local player = game.Players.LocalPlayer
and remove the third
One message removed from a suspended account.
One message removed from a suspended account.
yes
make sure the local script is in starter playerscript
its a script not a local script
oh
One message removed from a suspended account.
i don't think LocalPlayer work in server script but im not sure
do give the player a billboard ui
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@nocturne sundial btw how to i get the humanoid
local plr = game.Players.PlayerAdded:Wait() or game.Players.LocalPlayer
how does this help
you asking on how to get local player fomr server script?
not anymore
asking a dif thing
oh wait forgor to change it
the name
of this post
how to get humanoid from the players char
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
did some magic and this is the error i had before i changed the post @bold hearth
use
local character = plr.Character or plr.CharacterAdded:Wait()
like i sented before
btw this is inside a script
how do i use this
simple
just input this to ur script
oh
you got not player
get plr and then insert strings that i sented you
how do you guys send messages in script form? id like to help, but i dont know how to do that lol
tysm man
man i need to get the humanoid
how to i get a humanoid from a players char
here
look i need to get humanoid and only humanoid
** You are now Level 7! **
you cant "just" get humanoid in server script without other variables
allright
local RE = game.ReplicatedStorage.GiveHPBar
local frame = script.Parent
local label = frame.Label
local meter = frame.Meter
local humanoid = game.Players.LocalPlayer.Character:WaitForChild('Humanoid')
label.Text = humanoid.Health .. '/' .. humanoid.MaxHealth
meter.Size = UDim2.new(humanoid.Health / humanoid.MaxHealth, 0, 1, 0)
humanoid:GetPropertyChangedSignal('Health'):Connect(function()
label.Text = humanoid.Health .. '/' .. humanoid.MaxHealth
meter.Size = UDim2.new(humanoid.Health / humanoid.MaxHealth, 0, 1, 0)
end)
so what do i need
What he is saying is that you HAVE to get player and character to get the humanoid.
local player = game.Players.LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
this script is inside of a billboard gui thats gona be moved into the players char when the game starts
e
is your script local?
no
can you explain whats going on? where is your script? when does it get moved to the character?
** You are now Level 1! **
if it is getting moved to a character tho, you can simply put
local Humanoid = script.Parent:WaitForChild("Humanoid")
so i have the script inside of a billboardgui thats in replicated storage and then i have 2 scripts one is local and one is server the local one send remote to the server to clone the billboardgui into the players char
script is this
So ultimately, the script where you are trying to get the player's humanoid is inside of the billboardgui, that is parented to the player's character?
yes
local Humanoid = script.Parent.Parent:WaitForChild("Humanoid")
offical thing
lol i know what the character is
lol i see whats up
add another parent
local Humanoid = script.Parent.Parent.Parent:WaitForChild("Humanoid")
:)))
lol anytime. i suggest you do some more digging into the basics of lua; will save you a lot of future headaches
forgor to turn regen of put it works tested it in local test
One message removed from a suspended account.
i was wondering how to you like move/teleport parts?
might add a test dummy with respwan'
do you have to use vector3 put then how
@here
One message removed from a suspended account.