So I've been trying to script a simple punch animation that plays when you left click.
I'm using a local script, a server script and a remote event to run it.
Here's the Server Script:
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player,animationID)
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.come/Asset?ID="..animationID
local loadedAnimation = game.Workspace[player.Name].Humanoid:LoadAnimation(animation)
loadedAnimation:Play()
print("Punched")
end)
And here's the Local Script:
game:GetService("UserInputService").InputBegan:Connect(function(input, engine_processed)
if engine_processed then
return
end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
game.ReplicatedStorage.RemoteEvent:FireServer(7199296854)
print("Yes")
end
end)
My friend (The owner) joined and the punching animation worked for him and I could see it. I thought it was because he was the owner so I asked him to join on his other account and it still worked, but when I tried to punch it did not work.

8 comments
TTChaos, i got some stuff to say to you
Does the console say anything? I have a crouch animation and when it doesn't load in the game doesn't show it playing.
It does not show anything in the console. No errors.
Im pretty sure i've figured it out. Theres something wrong with my account and its not playing animations. I tried on one of my other accounts and it worked perfectly fine.