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

How to fix no animation play ability?

Asked by 4 years ago
Edited 4 years ago

Doesn't plays animation when died/reseted.


local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(Plr) Plr.CharacterAdded:Connect(function(char) wait(2) local Hum = char:WaitForChild("Humanoid") Hum.BreakJointsOnDeath = false Hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false) local anim = Instance.new("Animation") anim.AnimationId = "rbxassetid://4742312546" local DeathAnim = Hum:LoadAnimation(anim) Hum:GetPropertyChangedSignal("Health"):Connect(function() if Hum.Health <= 0 then DeathAnim:Play() end end) DeathAnim.Stopped:Connect(function() Hum.Health = 0 Hum:SetStateEnabled(Enum.HumanoidStateType.Dead, true) end) end) end)

animation link : https://www.roblox.com/library/4742312546/Reset

0
Are you trying to make like a Ragdoll Animation? Geobloxia 251 — 4y

1 answer

Log in to vote
0
Answered by
Geobloxia 251 Moderation Voter
4 years ago

I don't think you exported the animation correctly. I searched up rbxassetid://4742312546 and nothing appeared. I also tested the script and the output said it was an invalid link. So try exporting it again.

0
link isn't invalid, here is original link, rbxassetid:// is right input SuAkihiro 94 — 4y
Ad

Answer this question