Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

Is It possible to disable the default idle animation?

Asked by 3 months ago

I was wounder if it is possible to disable the default idle animation when a tool is equipped, then enabling it when the tool is unequipped, because i have my own idle animation but the default still plays. I've tried many things, like changing the id to nothing when equipped and putting the default id back, but noting seems to work.

0
Change the Animation Priority to Action. LazokkYT 91 — 3mo
0
add an animation to the tool thats idle and in the script in the tool script it to play the animation when you hold it Sabertooth11123 20 — 3mo

1 answer

Log in to vote
0
Answered by 2 months ago
Edited 2 months ago

It is easy. Simply use the Humanoid:LoadAnimation() function.

local tool = script.Parent
local plr

tool.Equipped:Connect(function()
if plr == nil then
plr =game.Players:GetPlayerFromCharacter( tool.Parent)
end
local anim = Instance.new("Animation") -- If you already have an animation, type the directory here
anim.AnimationId = "rbxassetid://youridhere" -- Edit, i forgot to add it in
local loadedAnim = plr.Character.Humanoid:LoadAnimation(anim)
anim.Looped = true
anim:Play()
tool.Unequipped:Connect(function()
anim:Stop()
end)
end)



Ad

Answer this question