Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can you answer my Animation question?

I have an animation that uses 2 hands however I want to use a tool with the animation but only the left arm will carry out the animation and the right will still hold the tool, how can I fix this? Also here is the content of the local script within the tool.

Tool = script.Parent
local player = game.Players.LocalPlayer
repeat wait() until player.Character ~= nil
local hum = player.Character:WaitForChild("Humanoid")

local animation = Tool.Animation 
local AnimTrack = hum:LoadAnimation(animation) 

Tool.Equipped:connect(function(mouse) 
    mouse.Button1Down:connect(function() 
        AnimTrack:Play()
    end)
end)

Tool.Unequipped:connect(function()
    AnimTrack:Stop()
end)


1 comment

0

Just an random idea here, but maybe you need to make the equip tool animation not play?

1 answer

Try this

Tool = script.Parent
local player = game.Players.LocalPlayer
repeat wait() until player.Character ~= nil
local hum = player.Character:WaitForChild("Humanoid")

local animation = Tool.Animation 
local AnimTrack = hum:LoadAnimation(animation) 

Tool.Equipped:connect(function(mouse) 
    mouse.Button1Down:connect(function() 
        AnimTrack:Play()
    end)
end) 
Tool.Parent = game.ServerStorage


wait(.1)
Tool.Parent = game.Players.LocalPlayer.Backpack

Not tested, studio is broken for me

1 comment

0

It will not stop if unequipped because of how I did this. But I can do something else if this doesn't please your fancy

This discussion is preserved as it was. New answers, comments, and votes are closed.