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:
Players = game:GetService("Players") player = Players.LocalPlayer char = player.Character larm = char:FindFirstChild("Left Arm") 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"]
.