Basically when you are proceed to equip tool1 and then de-equip it this animations becomes new hold animation for every single tool you got in your inventory (for everyone on server).
Haven’t tried anything so far, had no clue at all.
local Tool = nil
local animScript = nil
script.Parent.Equipped:Connect(function()
Tool = script.Parent
animScript = Tool.Parent:WaitForChild("Animate")
animScript:WaitForChild("toolnone"):WaitForChild("ToolNoneAnim")
animScript.toolnone.ToolNoneAnim.AnimationId = "https://roblox.com/asset/?id=idwashere"
end)
script.Parent.Equipped:Connect(function()
Tool = script.Parent
animScript:WaitForChild("toolnone"):WaitForChild("ToolNoneAnim")
animScript.toolnone.ToolNoneAnim.AnimationId = "https://roblox.com/asset/?id=idwashere"
end)
u meant there’s must be different equipped animation
on every tool?
actually, no, the current problem is when u de equip tool1, hold animation will spread on all other tools in your inventory, even if they have one
I don’t get it but try to use this
local tool = script.Parent
local animplay = nil
tool.Equipped:Connect(function()
animplay = humanoid:LoadAnimation(ANIMATION ID HERE)
animplay:Play() -- idle animations should be looped and the priority must be action
end)
tool.UnEquipped:Connect(function()
if animplay ~= nil then -- if its not blank or nil
animplay:Stop()
end
end)
Getting error, ‘failed to index loadanimation’
mb, i forgot to add humanoid
local tool = script.Parent
local humanoid = script.Parent.Parent:WaitForChild("Humanoid")-- just locate the humanoid
local animplay = nil
tool.Equipped:Connect(function()
animplay = humanoid:LoadAnimation(ANIMATION ID HERE)
animplay:Play() -- idle animations should be looped and the priority must be action
end)
tool.UnEquipped:Connect(function()
if animplay ~= nil then -- if its not blank or nil
animplay:Stop()
end
end)