Here is the script:
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local function childAdded(object)
if object:IsA("Tool") then
local handle = object:FindFirstChild('Handle')
if handle then
local rightArm
if humanoid.RigType ==Enum.HumanoidRigType.R15 then
rightArm = character:FindFirstChild("RightHand")
else
rightArm = character:FindFirstChild('RightArm')
end
if rightArm then
local rightGrip = rightArm:FindFirstChild("RightGrip")
if rightGrip then
rightGrip.Enabled = false
local motor = Instance.new("Motor6D")
motor.part0 = rightArm
motor.part1 = handle
motor.C0 = CFrame.new(0, -rightArm.Size.Y/2, 0)*CFrame.Angles(-math.pi/2,0,0)
motor.C1 = object.Grip
motor.Name = 'ToolGrip'
motor.Parent = rightArm
repeat
rightGrip.AncestryChanged:Wait()
until rightGrip == rightArm
motor:Destroy()
end
end
end
end
end
character.ChildAdded:Connect(childAdded)
No Motor6D was added to the player's character right arm and the RightGrip was not disabled when a tool is hold up.I was thinking well,maybe it need some sort of client side things to detect tools?Or maybe it need to detected by the client there was a animation require a handle so the motor6D need to be added from the server