Tool Animation not playing for my friend at all

I want to play a simple sword slashing animation when the tool is activated. However, while the animation does play properly for me, it doesn’t play for my friend, even though for me - I can see his character doing the animation.

The issue is that the animation is simply only working from my client, and that for others, even though it should work, it just doesn’t appear to play in the first place.

I feel like I have exhausted all possible solutions to this problem of mine, and it feels like I am getting nowhere.

Here is the code which handles the animations:

script.Parent.Activated:Connect(function()
	if isActivated == false then
		isActivated = true
		
		local attackAnim = script.Animations.SlashAnim

		local loadedAnim = game.Workspace[owner].Humanoid.Animator:LoadAnimation(attackAnim)
		loadedAnim:Play()
		loadedAnim:AdjustSpeed(1.5)	
		
		loadedAnim.Stopped:Connect(function()
			loadedAnim:Destroy()
			isActivated = false
		end)
	end
end)

I do preload the animation(s) using ContentProvider, if that helps.

I’m using r6 rigs, and this script is local.

1 Like

Common question: Is this a local script, or server script?

It’s a local script. Thanks for asking

Ah, probably the problem then. Use a RemoteEvent to do the animations on the server.

However, it is strange that you can see your friend doing it.

I already tried that. It just doesn’t work. Plus, animations are supposed to replicate no matter if it’s from localscript or not.

1 Like

This happened to me and my friend two days ago.
All the animations were playing for he, but for me nothing was happening.
He just re-uploaded the animations and now it works fine.
I hope that this solves your problem.

I’ll try that now.
Thanks for the input.

1 Like

Hey man, I know your problem. The animations in-game need to be created by the group that the game is under or by the person that has created the game.

2 Likes

Hello,
Give Me The Animation Id Maybe I Can Help You.

Here You Go Bro Try This:

isActivated = false
script.Parent.Activated:Connect(function()
if isActivated == false then
isActivated = true

	local attackAnim = script.Parent.Animations.SlashAnim

	local loadedAnim = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(attackAnim)
	loadedAnim:Play()
	loadedAnim:AdjustSpeed(1.5)	

	loadedAnim.Stopped:Connect(function()
		loadedAnim:Destroy()
		isActivated = false
	end)
end

end)

Using the Humanoid to load animations is deprecated, however.

image
You’re supposed to use the Humanoid’s Animator instead.

is this a group game or your game? Because if it’s your game and he plays it inside the actual game (not in studio) then he will see it. if it’s a group game, you have to set the owner of the animation to the group. If it’s your friend’s game, then he has to upload the animation and when you play it inside the actual game you will see the animation

2 Likes

I reuploaded the animation to the group that hosts the game, and it now works. Thanks so much for the input, i’ve been struggling with this for over a day.

2 Likes

My friend owns game, but i can’t see his animation in studio, but i can see animation in studio from another friend.