Animation only runs client sided and no one can see it [SOLVED]

For some reason, no one can see the animation run except the client running the script and I don’t know why

I know it’s a local script but that’s the only way animations work

Here is the script:

wait(1)
local plr = game.Players.LocalPlayer
local tool = plr.Character["Basic Sword"]
local animation = tool.swipeSword
local repStorage = game:GetService("ReplicatedStorage")

local animation = plr.Character["Basic Sword"].swipeSword
local swordSwipe = plr.Character.Humanoid:LoadAnimation(animation)
swordSwipe.Priority = Enum.AnimationPriority.Action
swordSwipe.Looped = false

tool.Activated:Connect(function()
	swordSwipe:Play()
end)


It’s a local script btw

2 Likes

I don’t know why he can’t see the script. However, a workaround would be for you/your friend to create a new script (which you both can see) and then paste the code.

I think the reason for him not seeing the animation (in-game) is because it’s a local script. I haven’t played around with animations so maybe it should be visible from local scripts.

2 Likes

I tried with server script and that doesn’t work you need a local or it doesn’t work for some reason

1 Like

Okay. But have you tried creating a new script file and pasting the code there?

Didn’t work like I can play the animation in-game but my friend can’t and he doesn’t see the animation either

1 Like

So he can see the script…?

I understood this as him being unable to see the script, not the effects of the script.

Oooh sorry mb Like he can’t see the effects in studio or in-game

Okay, I see. Thank you for clearing that up!

After googling I found this answer on another thread:

Perhaps this is the issue?

1 Like

Im not sure what this means like do I put the animation files in a server location?

1 Like

Based on what I’m hearing I think you have collaborative editing enabled. You might want to check this out: Collaborative Editing has arrived! - Updates / Announcements - DevForum | Roblox
Also is this in a group? If so, make sure to upload the animations to the group not to your account.

This is not in a group this is my account also I do have that enabled

1 Like

It wont work inside of a server script because you define the player as game.Players.LocalPlayer you can not define a local player inside of a server script, simply just delete your script and make a new local script then transfer the code to see if it works. Also maybe just use a remote event to transfer the animation and the player to the server and handle everything else server sided.

1 Like

I know about localplayer ( I said that’s a local script in the post ) I tried remote events and it did not work

1 Like

You need to put them in ReplicatedStorage I think. It’s on the server, and all players also have access to them.

That would explain it, animations are only authorized to be sent to members of a group or the owner, so because your animations are put in your account then it doesnt let him use it.

Were you using :FireServer and not .FireServer, How were you using the remote event. Have you both reloaded roblox studio? Did you make a new script? Are you defining the correct part?

Animations are only visible to the uploader at first, if the animation id’s and scripts are correct then you should be able to see them while you are in-game. If you still can’t see them then the animations may not have been exported to the website…

1 Like

I tried that now it’s not working

1 Like

What do you mean by incorrectly exported

1 Like

Also yes I used :FireServer I know how functions work

1 Like