So i’m trying to get the right arm but I keep getting the error below. I tried putting a wait() on my script and doing [“Right Arm”] and .RightArm. I’m dumb pls help!!! (R6)
Your game or avatar is probably R15 while Right Arm is only for R6 avatars.
It’s R6, I can assure you of that.
Could you show the full script you’ve used?
--variables
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Humanoid = Character:FindFirstChild("Humanoid")
local Tool = script.Parent.Parent
local Remotes = Tool:FindFirstChild("Remotes")
local Animations = Tool:FindFirstChild("Animations")
local ConnectM6D = Remotes:FindFirstChild("ConnectM6D")
local DisconnectM6D = Remotes:FindFirstChild("DisconnectM6D")
--functions
Tool.Equipped:Connect(function()
--Motor6D handler
ConnectM6D:FireServer(Tool.BodyAttach)
local Motor6D = Instance.new("Motor6D")
Motor6D.Parent = Character:FindFirstChild("Right Arm")
Character.RightArm.Motor6D.Part0 = Character.RightArm
Character.RightArm.Motor6D.Part1 = Tool.BodyAttach
end)
Tool.Unequipped:Connect(function()
--Motor6D handler
DisconnectM6D:FireServer()
end)
Okay, so, you are waiting for the character. Have you tried adding a wait(5)
at the top of the script in case the character doesn’t load for some reason?
I said I already tried that. -_-
First off, are you using R15 or R6? In R15 right arm is invalid. Secondly I suggest adding :FindFirstChild() instead of character.RightArm. I don’t even thing RightArm would be valid in R6.
local rightArm = character:FindFirstChild(“Right Arm”) may do the trick
Try adding this bit of code after the variable Character
to print all parts’ names inside the character.
for _, bodyPart in pairs(Character:GetChildren()) do
print(bodyPart.Name)
end
Yeah thats kinda why I made this thread to find out the right term to use and it says in the title r6.
Right term is Right Arm
. 30 characters
I just want to know if I do [“Right Arm”] or .RightArm or something else because that hasn’t worked.
In workspace when you open the game you character can be found in it. It’ll be the same name as your username. In there you can find all the children of your character.
I suggest doing this
local rightArm = character:FindFirstChild("Right Arm")
I mean yes, but it doesn’t work.
Fix the line RightArm.Motor6D.Part0 = Character.RightArm
?
Yeah, I did that just now. (30 characters)
Like I said, RightArm is NOT a valid member of a R6 body.
Add the space.
The fact it;'s giving you the RightArm error up there means the space isn’t seen somewhere.
Which I see the problem, take a close look at your last line of the code you sent above. it clearly says character.RightArm
Rewrite your script you pictured because there’re some parts that can be shorter:
Tool.Equipped:Connect(function()
ConnectM6D:FireServer(Tool.BodyAttach)
local Motor6D = Instance.new("Motor6D")
local RightArm = Character:FindFirstChild("Right Arm")
Motor6D.Parent = RightArm
RightArm.Motor6D.Part0 = RightArm
RightArm.Motor6D.Part1 = Tool.BodyAttach
end)