#animation into a tool

1 messages · Page 1 of 1 (latest)

void elk
#

i need help making an animation a tool, and for it to play when i click. i just need the script for it becuase i cant script for the life of me, but i can do everything else

amber oyster
void elk
#

yeah

#

i made the animations and whatever i just need them in the game as a tool i can use

dense kiln
#

Because im having the same problem I have the script I have the animation I just cant get the AnimationID to insert it into the script

#

local tool = script.Parent

local function onEquipped()
print("Tool equipped") -- Check if this prints

local character = tool.Parent
local humanoid = character:FindFirstChildOfClass("Humanoid")

if not humanoid then
    warn("Humanoid not found in character.")
    return
end

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://6765432179"  -- Wave animation
local track = humanoid:LoadAnimation(animation)

tool.Activated:Connect(function()
    print("Tool clicked") -- You should see this in Output

    if track then
        print("Playing animation")
        track:Play()
    else
        warn("Animation track not loaded.")
    end
end)

end

tool.Equipped:Connect(onEquipped)

#

@void elk this is the script im using it should work for your cause and it also allows for output window so you know whats not working

#

But do change where it says wave animation i had to change that so I can properly test my tool