Hello, I am trying to make a variable for the players Left Arm, found under character. I tried using FindFirstChild and WaitForChild and still got nothing when I tried to print the Parent. Here are the scripts:
1 | Players = game:GetService( "Players" ) |
2 | player = Players.LocalPlayer |
3 | char = player.Character |
4 | larm = char:FindFirstChild( "Left Arm" ) |
5 | print (larm.Parent) |
The other script is the same expect for WaitForChild being there instead of FindFirstChild. Thanks for reading!
When you see something like obj.property
, that is sugar for using table-indexing with []
:
obj.property
is exactly the same thing as obj["property"]
.
Thus, you could use either char.Head
or char["Head"]
.
While you can't use char.Left Arm
, since a string literal can have spaces in it, you can use char["Left Arm"]
.