#animation into a tool
1 messages · Page 1 of 1 (latest)
u have the model and stuff?
yeah
i made the animations and whatever i just need them in the game as a tool i can use
have you found a solution?
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