Left Handed Tools

Hello,

I’ve spent quite some time today messing around trying to figure out the most efficient way to have a player hold a tool on it’s left side. I’ve managed to work something out, though I’m not to pleased as there’s quite the delay upon equipping the tool.

Script
script.Parent.Equipped:Connect(function()
	local character = script.Parent.Parent
	
	local Animator = character.Animate
	local Animation = Instance.new("Animation")

	Animation.AnimationId = "http://www.roblox.com/asset/?id=7021848701"
	Animation.Name = "ToolNone"
	Animation.Parent = Animator.toolnone
	Animator.toolnone.ToolNoneAnim.Parent = Animator
	
	character["Right Arm"]:WaitForChild("RightGrip"):Destroy()
	
	local motor = Instance.new("Motor6D", script.Parent.Handle)

	motor.Part0 = character["Left Arm"]
	motor.Part1 = script.Parent.Handle
end)

script.Parent.Unequipped:Connect(function()
	local character = script.Parent.Parent.Parent.Character
	local Animate = character.Animate

	Animate.toolnone.ToolNone:Destroy()
	Animate.ToolNoneAnim.Parent = Animate.toolnone
end)

The way it works is, the script welds the Handle of the tool to the players left arm, and a WeldConstraint attaches the tool to it. The script also lowers the right arm and allows it to move like normal when the player walks, whilst also playing an animation to keep the players left arm still.

If anyone has a better way of doing this it’d be appreciated!

Thanks

4 Likes

I did this exact same thing recently. Roblox really needs to add built in support for left handed tools. I do relatively the same thing, but I don’t destroy the weld and I don’t see any delay:

local grip = Character.RightHand:WaitForChild("RightGrip")
	
grip.Part0 = Character.LeftHand
grip.Part1 = Tool.Handle
grip.Name = "LeftGrip"
grip.Parent = Character.LeftHand

this happens right on equip, I haven’t tested it without WaitForChild, so you might be able to make it even faster with a standard dot operator (~20% faster than :FindFirstChild, and much faster than :WaitForChild). I also see that you’re using a motor6d, which the normal tool grip isnt, I suppose if you require the motor6d this wouldn’t even work, but I haven’t needed it. Hopefully roblox adds support for left handed tools in the future.

15 Likes

Thanks for your help! I was thinking the exact same thing, Roblox needs to add some sort of dropdown menu in the tool properties which allows you to decide which side it equips on!

5 Likes

Hey there, when i equip for the second time, it just returns back to my left hand, and giving me and error about infinite yield on left hand, any solution?