Anim not playing?

So, I am making a like super power type thing so where I say the certain phrase it changes my clothing and does an animation. When I do the animation is not playing(I’m in r6 and I animated an r6 rig)

local anim = script.Animation

game.ReplicatedStorage.Anim.OnClientEvent:Connect(function()
	local player = game.Players.LocalPlayer
	local Character = player.Character
	local Humanoid = Character:WaitForChild("Humanoid")
	
	local Animation = Humanoid:LoadAnimation(anim)
	Animation:Play()
	
end)

The animation is inside the script and a serverscript that detects when they chat fires the client event.

Welp no one here i might just take this down

You error is in : local Animation = Humanoid:LoadAnimation(anim)

replace it by

local Animation = Humanoid.Animator:LoadAnimation(anim)

Alright ill try rn ty for the response

Just tried it, didnt work sadly

Do you have any error in the console?

Try to do a print() so that you can know if the remote is firing or not

no for some reason not ill add prints rn to check

Is it printing anything on the output?

I made the prints it made it to the end but it still doesnt work

This is really weird, I don’t really see an error on your code, the error that was there it was :

local Animation = Humanoid.Animator:LoadAnimation(anim)

Its an r6 anim so anything dif with that?

Is the character is R6 or R15?

r6 im pretty sure ill check one more time

Oh it’s a local script so it only plays in client

i think i messed it up that bad dang

Try doing this :

game.ReplicatedStorage.Anim.OnClientEvent:Connect(function()
	local Remote = your remote here
	Remote:FireServer()
end)

And on the server side :

game.ReplicatedStorage.YourREMOTE.OnServerEvent:Connect(function(Player)

local anim = your anim here
	local Character = Player.Character
	local Humanoid = Character:WaitForChild("Humanoid")
	
	local Animation = Humanoid:LoadAnimation(anim)
	Animation:Play()
end)
1 Like

So, the real problem was that it was not in r6 after all i realize that I am eternally stupid ty for your time and you may L on me or whatever lol i am gonna die now :slight_smile:

Oh it’s ok, the thing that is important is that we found the solution !

1 Like