So I am making a game that has guns in it and I was doing great until I hit an error that has been reported and posted in other forum Posts, but none of them have a solution.
The Error that is causing this Says
“Cannot Load AnimationClipProvider Service”
and it causes the Animations to not play. Now the Animations work perfectly fine and there’s not bug when you first play, but if you die, then the Error comes, and if you use the gun after the Error Comes, Aka After Death then the Animations for the gun Don’t work.
The Animations That are meant to be playing are the gun animations, Such as: Equipping then Holding it idle and Unequipping it.
I’ve tried seeing if it was the character variable referring to the old character after death, but I don’t think it was that. And I’ve tried a few other things that I can’t remember as of making this.
I’ve also tried looking around other posts on the forum to see if others have this error and there’s a lot but none of them have answer, they either say
“It’s because of team create because others animations”
(Which isn’t the case because I am working Solo on this Project and all the animations belong to me) or they don’t have any answers.
Now this is my first post so I am not too sure if this is the right topic section for this post and I tried to put this Post in the Engine Bug Category but couldn’t find it. So if this is the wrong section please tell me, and I’ll take note!
And yeah I’m pretty sure this is an Engine bug but couldn’t find the Category.
Also, Thank you to any replies And suggestions!
And Here’s the code in the script, that doesn’t work after death:
local Uis = game:GetService("UserInputService")
local Rs = game:GetService("RunService")
---
local Plr = game.Players.LocalPlayer
local Chr = Plr.Character or Plr.CharacterAdded:Wait()
local Camera = game:GetService("Workspace").CurrentCamera
---
local Gun = script.Parent
local AimEvent = script.Parent.GunHoldAnim:WaitForChild("AimEvent")
local AmmoEvent = script.Parent.Server.AmmoEvent2
local EquipEvent = script.Parent.GunHoldAnim.EquipEvent
local M9AnimEvent = game.ReplicatedStorage.BindableEvents.GunAnimationEvents.M9AnimEvent
---
local AmmoGui = Plr.PlayerGui:WaitForChild("AmmoDisplay").AmmoGuiM9
--
---
Humanoid = Chr:WaitForChild("Humanoid")
local Animator = Humanoid:FindFirstChild("Animator")
local HoldId = script:WaitForChild("Hold")
HoldAnim = Animator:LoadAnimation(HoldId)
local AimId = script:WaitForChild("Aim")
AimAnim = Animator:LoadAnimation(AimId)
local AimReloadId = script:WaitForChild("AimReload")
local AimReloadAnim = Animator:LoadAnimation(AimReloadId)
local UnequipId = script:WaitForChild("Unequip")
UnequipAnim = Animator:LoadAnimation(UnequipId)
local AimingUnequipId = script:WaitForChild("AimingUnequip")
AimingUnequipAnim = Animator:LoadAnimation(AimingUnequipId)
---
EquipEvent.Event:Connect(function(IsAiming)
Gun.Equipped:Connect(function()
print("Equipped!0")
if Humanoid then
AmmoGui.Enabled = true
HoldAnim:Play()
wait(0.5)
HoldAnim:AdjustSpeed(0)
AmmoEvent:FireServer(Chr, Humanoid)
end
end)
--
Gun.Unequipped:Connect(function()
AmmoGui.Enabled = false
if IsAiming.Value == false then
HoldAnim:AdjustSpeed(1)
UnequipAnim:Play()
end
if IsAiming.Value == true then
HoldAnim:AdjustSpeed(1)
AimAnim:AdjustSpeed(1)
AimingUnequipAnim:Play()
end
end)
end)