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)
Okay so basically i'm pretty sure it doesn't have to do with scripting but i'll answer anyways. So since your friend made the animation tell them to go back to it and press the three dots on the left side top corner [this is roblox studio animator by the way so if its not made in that i dont know] and then go to animation priority and set it to movement.