Exoiryx
(Exoiryx)
#1
Me and my friend have been trying to get an idle animation for our punching script but nothing we do works.
when we equip the punching tool all it does is stick our hand out.
Here’s the script
local tool = script.Parent
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://13026274633"
local track
tool.Equipped:Connect(function()
track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = true
track:Play()
end)
tool.Unequipped:Connect(function()
if track then
track:Stop()
end
end)
p49p0
(Panthera)
#2
this (should) work.
local tool = script.Parent
local anim = Instance.new("Animation", workspace)
anim.AnimationId = "rbxassetid://13026274633"
local track
tool.Equipped:Connect(function()
track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = true
track:Play()
end)
tool.Unequipped:Connect(function()
if track then
track:Stop();
end
end)
1 Like
Exoiryx
(Exoiryx)
#3
Very nice, it works. Could you tell us what we kept getting wrong?
p49p0
(Panthera)
#4
according to my experience, if the animation
is not in workspace it wouldn’t play.
1 Like
system
(system)
Closed
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.