Animations not working for others in team create

Here is the video (for others)
https://streamable.com/3v2tuf

for me
https://gyazo.com/a0c2df5f2dff639f0d26af197b60421d

The code

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local anim = script.Parent:WaitForChild("Equip")
local EquipAnim = char:WaitForChild("Humanoid"):LoadAnimation(anim)
local tool = script.Parent

tool.Equipped:Connect(function()
	EquipAnim:Play()
	print("Anim played")
end)

tool.Unequipped:Connect(function()
	EquipAnim:Stop()
	print("Anim stopped")
end)
2 Likes

Oof

The animation is only being played locally (Or on your side), which is why you’re only able to see it others cannot

It is actually possible to fix this by changing your script to a Server Script instead & defining the Character using script.Parent.Parent & doing a bit of global/local variables:

local Tool = script.Parent
local Anim = Tool:WaitForChild("Equip")
local Character
local Animator
local EquipAnim

Tool.Equipped:Connect(function()
    Character = Tool.Parent
    Animator = Character:WaitForChild("Humanoid"):WaitForChild("Animator")
    EquipAnim = Animator:LoadAnimation(Anim)

    print("Anim played")
    EquipAnim:Play()
end)

Tool.Unequipped:Connect(function()
    print("Anim stopped")
    EquipAnim:Stop()
end)

Since Tool.Unequipped will parent the Tool to the Player’s Backpack, we can instead reference the Character using Tool.Equipped using global variables inside our Events

It dosent work at all in game anymore but works in studio

In game
image

Studio
image

Script

local Tool = script.Parent
local Anim = Tool:WaitForChild("Equip")
local Character
local Animator
local EquipAnim

Tool.Equipped:Connect(function()
	Character = Tool.Parent
	Animator = Character:WaitForChild("Humanoid"):WaitForChild("Animator")
	EquipAnim = Animator:LoadAnimation(Anim)

	print("Anim played")
	EquipAnim:Play()
end)

Tool.Unequipped:Connect(function()
	print("Anim stopped")
	EquipAnim:Stop()
end)

image

Is the animation owned by you & did you publish it? I believe it won’t work if you’re using a different one made by someone else

Yes the animation is made by me
https://www.roblox.com/library/6700014029/EquipAnimV4
Its just not on sale

It’s a place you made individually and not a group game that was made by a group, right…?

No its a team create with my friend not a group or anything

Ok but I still don’t know what place it is

Is it a place you made or a place that your friend made?

He made the place
https://www.roblox.com/games/6687027803/Upcoming-RPG-Game?refPageId=4710828d-f744-48d6-a260-b9e217a0ef9e

Yeah that explains it

If your friend owns the place, you won’t be able to play the animation ingame so you need to ask your friend to publish the animation instead for it to work

3 Likes

How could I give him the animation to publish it?

You could save the file that you made the animation from, then send it to him using the Animaton Editor & publish it that way

I believe as long as you’re the owner of the animation in the place that you made, it should work

I used moon animator will that effect anything?

I don’t know how Moon Animator works but I’m assuming as long as you are able to save the file, you & your friend both have access to it & can publish it through the Animator, you should be fine I believe?

1 Like

Now the animation dosent work for me

Are you sure that you imported & published it right? Using the ID that your friend published?

NVM I GOT IT TO WORK TYSM (only works in-game not studio!)

1 Like

Okay that’s gonna confuse the heck out of me if it switches like that
Well at least it’s fixed regardless! :sweat_smile:

2 Likes