Simple question about referencing instances with whitespace

So I’m just trying to call something with a space in it like this -
local Larm = player.Character.Left Arm

But obviously it won’t work because of the space in “Left Arm” and I forgot how your suppose to put it so you can include spaces.

2 Likes
local Larm = player.Character:WaitForChild("Left Arm")
2 Likes
local Larm = player.Character["Left Arm"]
3 Likes
local Larm = player.Character["Left Arm"] --Same as the one below.
local Larm = player.Character:FindFirstChild("Left Arm") --Finds the child called "Left Arm".
local Larm = player.Character:WaitForChild("Left Arm") --If the arm has not spawned, perhaps you are using a custom arm; then this would help.

Just like the users above mentioned.

local LeftArm= player.Character:WaitForChild("Left Arm",math.huge)

I think this sequence of code will repeat searching until it finds the part.

Doesn’t :WaitForChild() infinitely yield by default? Seems like adding math.huge is redundant.

Oh, right. The math.huge just gets rid of the warning message, but other than that, there’s no point in using it.