so basically i am trying to make a pillow weapon but the animations never load. I tried multiple different ways to do it, including a click detector when attacking, i looked up a bunch of tutorials but none of them work. my friend made the animation and i created the game. I have them under the script but i just hold the tool like a block. this is an example of my click detector script:
local uIS = game:GetService("UserInputService") local click = script.Parent.ClickDetector
script.Parent.Equipped:Connect(function() local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) idle:Play() end)
script.Parent.Equipped:Connect(function(hit) click.MouseClick:Connect(function() local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) attack:Play() end) end)
and this is my script without the click detector:
local db = false
local canHit = false
local idle
local slash
local randomSlash = 1
local con = { damage = 5 }
script.Parent.Equipped:Connect(function() script.Parent.Handle.Equip:Play() local humanoid = script.Parent.Parent:FindFirstChild("Humanoid") if not idle then idle = humanoid:LoadAnimation(script.Idle) idle:Play() end end)
script.Parent.Activated:Connect(function() if not db then db = true
local humanoid = script.Parent.Parent:FindFirstChild("Humanoid")
if not slash then
if randomSlash == 1 then
slash = humanoid:LoadAnimation(script.Slash1)
randomSlash = randomSlash + 1
elseif randomSlash == 2 then
slash = humanoid:LoadAnimation(script.Slash1)
randomSlash = randomSlash - 1
end
end
slash:Play()
wait(.2)
script.Attack:Play()
wait(.8)
if slash then
slash = nil
db = false
end
end
end)

1 comment
k so it worked but i made another weapon and this one wont load as well, i put the priority to action because its meant to be a weapon attack animation and it wont load