Anim not playing on server

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)

When you publish your animation, make sure you set the creator to the owner of the game:

  • If you’re the owner, set the creator to me.
  • If the game is made by a group, set the creator to that group.

I tested your script and it seems to work fine with my animation. Make sure the AnimationId is correct and that script.Parent.Canhit.Value is true.

You can print("hit") after Anim:Play() to check if everything works.

it is true. the anim does not play. but it does deal damage

OHHHH I GET IT. ITS THE ANIMATE SCRIPT! hm its kinda weird but ye

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.