While trying to animate my character, I wanted to put the Motor6D in the right arm of it. The issue is, there’s a space in the name of Right Arm, and my script wont work because of it.
Is there a way to find the Right Arm in the script without the name?
1 Like
If the name of a part you want to access has a space, you should use this:
["Right Arm"]
so your script should be:
Tool.Equipped:Connect(function()
motor = Instance.new("Motor6D")
motor.Parent = script.Parent.Parent.["Right Arm"]
motor.Part0 = script.Parent.Parent.["Right Arm"]
motor.Part1 = Bat
I believe there’s an ‘Enum.Limb’ variable.
GetLimb() also exists
Just use :FindFirstChild(instancename)
if it’s a server script or :WaitForChild(instancename)
if it’s a local script. Idk why no one mentioned that yet.
So for example
script.Parent.Parent:FindFirstChild("Right Arm")
script.Parent.Parent:WaitForChild("Right Arm")