Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My animation not working, while other one does?

Asked by 5 years ago

I have a roll animation that plays on key pressed. It doesn't work, but I put in my other simple hand movement animation, and it worked. What am I doing wrong? Here is my script: server side


local rs = game:GetService("ReplicatedStorage") local function onPunchFired(plr) local char = game.Workspace:FindFirstChild(plr.Name) print(char.Name) local humanoid = char.Humanoid local animation = Instance.new("Animation") animation.AnimationId = "rbxassetid://2751075919" local animTrack = humanoid:LoadAnimation(animation) animTrack:Play() end rs.punchEvent.OnServerEvent:Connect(onPunchFired)

it prints the player name with no error.

0
Its my animation to. CaptainD_veloper 290 — 5y
0
Nothing seems wrong with it besides how you get character (just do plr.Character on line 4). Do you own the second animation which doesn't play? You could also just play animations on the client side. xPolarium 1388 — 5y
0
I own the animations and I want others to see player roll too. CaptainD_veloper 290 — 5y

Answer this question