I've been trying to have the script recognize the R6 player's Right Arm, but nothing I tried has worked. Can anyone help me? This is for a tool.
local tool = script.Parent
local player = tool.Parent.Parent
local char = player.Character
local function onEquip()
char["Right Hand"]:WaitForChild("RightGrip"):Destroy()
--weld to right arm with a motor 6D weld
local Motor6D = Instance.new("Motor6D",char.RightHand)
Motor6D.Name = "Handle"
Motor6D.Handle = char.RightHand
Motor6D.Parts = tool.Handle
--inseting the equip animation
local Anim = Instance.new('Animation')
Anim.AnimationId = "rbxassetid://5182371679"
AnimTrack = char.Humanoid:LoadAnimation(Anim)
AnimTrack:Play()
Motor6D.C0 = CFrame.new(0,0,0)
end
local function onUnequip()
if char.RightHand:FindFirstChild("Handle")then
char.RightHand.Handle:Destroy() --gets rid of motor 6d
end
AnimTrack:Stop()
end
local function onActivate() --when you click
end
local function onDeactivate()
end
tool.Equipped:Connect(onEquip)
tool.Unequipped:Connect(onUnequip)
tool.Activated:Connect(onActivate)
tool.Deactivated:Connect(onDeactivate)

2 comments
Change "Right Hand" to "Right Arm"
Thank you.