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

Error AnimationClipProvider service failed to load. Anyone know why?

Asked by 2 years ago

This the code with animations, it is for a driveby script put inside the tool

-- Animations --
local l_frontaim_anim = 'rbxassetid://10967653013' -- stance = 2
local l_rightaim_anim = 'rbxassetid://10967653851' -- stance = 3
local l_leftaim_anim = 'rbxassetid://10967654620' -- stance = 4
local l_topaim_anim = 'rbxassetid://10967655398' -- stance = 5
local l_frontaim_animation = Instance.new('Animation')
l_frontaim_animation.AnimationId = l_frontaim_anim
left_frontaim = plrhum:LoadAnimation(l_frontaim_animation)

local l_rightaim_animation = Instance.new('Animation')
l_rightaim_animation.AnimationId = l_rightaim_anim
left_rightaim = plrhum:LoadAnimation(l_rightaim_animation)

local l_topaim_animation = Instance.new('Animation')
l_topaim_animation.AnimationId = l_topaim_anim
left_topaim = plrhum:LoadAnimation(l_topaim_animation)

local l_leftaim_animation = Instance.new('Animation')
l_leftaim_animation.AnimationId = l_leftaim_anim
left_leftaim = plrhum:LoadAnimation(l_leftaim_animation)

plrhum.Changed:connect(function(prop)
    if plrhum.Jump then
        stance = 1
        drivebyposed = false
        left_frontaim:Stop(speed)
        left_rightaim:Stop(speed)
        left_leftaim:Stop(speed)
        left_topaim:Stop(speed)
    end
end)

sp.Equipped:connect(function()
    equipped = true
end)

sp.Unequipped:connect(function()
    equipped = false
    seat = plrhum.SeatPart  
    if plrhum.Sit == true then
        script.Conversion:FireServer('UnPos', seat) 
    end
    left_frontaim:Stop(speed)
    left_rightaim:Stop(speed)
    left_leftaim:Stop(speed)
    left_topaim:Stop(speed)
end)

uis.InputBegan:connect(function(input, GameProcessedEvent)
    if equipped and input.KeyCode == Enum.KeyCode.Z and not GameProcessedEvent and plrhum.Sit then
        stance = stance + 1
        seat = plrhum.SeatPart      
        script.Conversion:FireServer('Pos', seat)
        if stance == 1 then
            drivebyposed = false
            --print('sitting')
            seat = plrhum.SeatPart  
            script.Conversion:FireServer('UnPos', seat) 
            left_frontaim:Stop(speed)
            left_rightaim:Stop(speed)
            left_leftaim:Stop(speed)
            left_topaim:Stop(speed)
        elseif stance == 2 then
            drivebyposed = true
            --print('frontaim')
            left_frontaim:Play(speed)
            left_rightaim:Stop(speed)
            left_leftaim:Stop(speed)
            left_topaim:Stop(speed)
        elseif stance == 3 then
            drivebyposed = true
            --print('rightaim')
            left_frontaim:Stop(speed)
            left_rightaim:Play(speed)
            left_leftaim:Stop(speed)
            left_topaim:Stop(speed)
        elseif stance == 4 then
            drivebyposed = true
            --print('leftaim')
            left_frontaim:Stop(speed)
            left_rightaim:Stop(speed)
            left_leftaim:Play(speed)
            left_topaim:Stop(speed)
        elseif stance == 5 then
            drivebyposed = true
            --print('topaim')
            left_frontaim:Stop(speed)
            left_rightaim:Stop(speed)
            left_leftaim:Stop(speed)
            left_topaim:Play(speed)
            stance = 0
        end
    end
end)

And this is the server script

script.Parent.OnServerEvent:Connect(function(player, Request, obj)
    if Request == "Pos" then
        if obj.Name == "FR" or obj.Name == "RR" then
            obj:FindFirstChild('SeatWeld').C0 = CFrame.new(2.3,1.5,-0.6)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)    
        elseif obj.Name == "FL" or obj.Name == "RL" then
            obj:FindFirstChild('SeatWeld').C0 = CFrame.new(-2.3,1.5,-0.6)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,110) 
        end
    elseif Request == "UnPos" then
        obj:FindFirstChild('SeatWeld').C0 = CFrame.new(0, 0, 0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)
    end
end)

Can anyone help? I am really confused and this has been going on for days.

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

Its a weird bug that isn't an error caused by your script. I also had that problem. I searched a bit on devforum and although it doesnt make sense to me, you just have to add this.

local player = --path to player object
repeat task.wait() until Player.Character

The reason this confused me was because i already had

local character = Player.Character or Player.CharacterAdded:Wait()

but eh... Here is the Link to the page.

0
this is a localscript so do i just with game.Players.LocalPlayer.Character? hndcwffs 14 — 2y
0
ok it worked as game.Players.LocalPlayer.Character hndcwffs 14 — 2y
Ad

Answer this question