Basically, I have an issue where whenever I reset I get the error
Cannot load the AnimationClipProvider Service
The main reason I am confused is because it only happens after I reset, not when I start in the game
why could this be
(local script where animations are played)
local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local char = plr.Character or plr.CharacterAdded:Wait()
game:GetService('RunService').Stepped:Wait()
local hum = char:WaitForChild("Humanoid", math.huge)
local animator = hum:WaitForChild("Animator")
local idle
local attack
local db = false
pcall(function()
game:GetService("RunService").Stepped:Wait()
attack = animator:LoadAnimation(script:WaitForChild("Attack"))
idle = animator:LoadAnimation(script:WaitForChild("Idle"))
end)
local raycast = require(game.ReplicatedStorage.RaycastHitboxV4)
local box = raycast.new(script.Parent:WaitForChild("Handle", math.huge))
script.Parent.Equipped:Connect(function()
if idle then
idle:Play()
end
end)
script.Parent.Unequipped:Connect(function()
if idle then
idle = animator:LoadAnimation(script:WaitForChild("Idle"))
end
idle:Stop()
end)
script.Parent.Activated:Connect(function()
if db then return end
db = true
box:HitStart()
if attack then
attack:Play()
end
wait(0.3333333432674408)
box:HitStop()
wait(1.15)
db = false
end)
box.OnHit:Connect(function(hit, humanoid)
if hit.Parent:FindFirstChild("Boss") then
script.Parent.Strike:FireServer(humanoid, hit.Parent.Values)
end
end)
hum.Died:Connect(function()
animator = nil
idle = nil
attack = nil
script.Parent:Destroy()
end)
server-side just in case
local damage = 10
script.Parent.Strike.OnServerEvent:Connect(function(plr, hum, values)
if not values.Invincible.Value then
if values.Parry.Value then
hum:TakeDamage(damage*values.BaseDamageMultiplier.Value)
plr.Character.Humanoid.Health+=10
else
hum:TakeDamage(damage)
end
end
end)