Hello! im makin a fangame based on another game. but the animations wont load when the enemy attacks you. i have no idea what the issue is. theres no errors.
Note : the animations are mine!! the priority is action and i searched everywhere. no solutions worked. well what i found.
so i hope you guys can help me!
Script:
local SearcherAttack = Instance.new("Animation") SearcherAttack.AnimationId = "rbxassetid://15244854695" local debounce = false local Anim = script.Parent:WaitForChild("Humanoid").Animator:LoadAnimation(SearcherAttack) script.Parent.HumanoidRootPart.Touched:Connect(function(hit) local character = hit.Parent if character and character:FindFirstChild("Humanoid") then if not debounce then if script.Parent.Canhit.Value == true then debounce = true Anim:Play() character:FindFirstChild("Humanoid"):TakeDamage(20) wait(3) debounce = false end end end end)