I'm a bit of a seasoned programmer, and I normally don't comment on anything: but thank you for showing how to rig the tool up to the character as well, as I was a bit stuck. No other tutorial showed specifically that, and I'm pretty tired.
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.R6 then rightArm = character:FindFirstChild('RightHand') else rightArm = character:FindFirstChild('Right Arm') 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) ---------The script----------
script.Parent.Activated:Connect(function() local a = script.Parent.Parent.Humanoid.Animator:LoadAnimation(script.Parent:WaitForChild("Animation")) a.Priority = Enum.AnimationPriority.Action4 a:Play() End)
I dont get it, a tutorial or a detailed guide in the comments would be nice 💀 kinda like The Mimic where when you equip the item it keeps moving forever, like you dont have to click for it to animate, the animation keeps looping until you unequip it.
The only tutorial that shows how to do it without making it as complicated as humanly possible.
I been wanting to learn this for a year now, now i finally found the right video that helps me, thank you.
Underrated. deserves more recognitions!
You should consider making a small game tutorial nothing crazy something relatively quick and easy
uppp
Been needing this, thank you
Thank you so much
This is really useful! Thanks
wow it works!
r15 dont work for me
I'm a bit of a seasoned programmer, and I normally don't comment on anything: but thank you for showing how to rig the tool up to the character as well, as I was a bit stuck. No other tutorial showed specifically that, and I'm pretty tired.
can you also show tutorial on how to make an idle for tool? i mean once the animation is over it will stay on that pose
just loop the animation
Works!, thank you!
I have a question, how would I connect something to both arms? Would I do it by just doing the same thing I did for the right arm to the left arm?
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.R6 then
rightArm = character:FindFirstChild('RightHand')
else
rightArm = character:FindFirstChild('Right Arm')
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)
---------The script----------
thanks
Thank you
how do like a idle while holding a sword
script.Parent.Activated:Connect(function()
local a = script.Parent.Parent.Humanoid.Animator:LoadAnimation(script.Parent:WaitForChild("Animation"))
a.Priority = Enum.AnimationPriority.Action4
a:Play()
End)
Also do you know why C0 is set to that? I checked the documentation but couldn't understand why C0 for the motor is at the palm of the hand
Could you also make a tutorial on how to change the hand/hands position alongside the tool?
add plugins tool grip editor
How to like, animate not only the handle but other parts of the tool? Kinda like The Mimic lantern
Add more Motor6Ds but inside of the handle instead, the animator will recognize it if you do it correctly.
I dont get it, a tutorial or a detailed guide in the comments would be nice 💀 kinda like The Mimic where when you equip the item it keeps moving forever, like you dont have to click for it to animate, the animation keeps looping until you unequip it.
Thanks
when I change scripts and I create a system to save the animation it triggers when I press e but it no longer works
is there a sepcific reason why the motor6d's parent is the right arm? Or does that make it easier to find?
It's so the tool follows the right arm.
2:32 Scripting
First also i was watching 6 seconds ago
This type of comment ruin the whole comment section