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

Animation only loading for the person who made it?

Asked by 5 years ago
Edited by SerpentineKing 5 years ago

Whenever I play the game and press E it says in the output, "Animation "https://www.roblox.com//asset/?id=2920259551&serverplaceid=0" failed to load in "Animation.AnimationId": Animation failed to load" And when the person who made the animation does it it work.

Script:

local debounce = false

game.ReplicatedStorage:WaitForChild("Punch"):FireServer()
    function PunchAnimation(input)
    if input.KeyCode == Enum.KeyCode.E and debounce == false then   
        debounce = true 
        local anim = Instance.new('Animation')
        local player = game.Players.LocalPlayer
        anim.AnimationId = 'rbxassetid://2920259551'
        local loadanimation = player.Character.Humanoid:LoadAnimation(anim)
        loadanimation:Play()
        game.Players.LocalPlayer.Character:FindFirstChild("RightHand").Touched:Connect(function(hit)
            if hit.Parent:FindFirstChild("Humanoid") ~= nil and debounce == false then
                debounce = true
                local char = hit.Parent:FindFirstChild("Humanoid")
                char:TakeDamage(20)
                wait(5)
                debounce = false
            end
        end)
        wait(5)
        debounce = false
        end
    end
    game:GetService("UserInputService").InputBegan:Connect(PunchAnimation)

[SerpentineKing]: Input correct code format

0
normal script or local script? CommanderCaubunsia 126 — 5y
0
Try trying the game with the actual roblox player not studio. Roblox is having a lot of errors with decals, animations and audio! retrobricks 162 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

Animations will only work in studio for the person who created the animation, period, there is no work around unless you are using animations created by ROBLOX.

While this may be inconvenient for team creations, this is to prevent players from stealing the item.

The animations will play for all players when in-game if the group owner or place owner (depending on what type of game this is) owns the animation.

If you want to test the animation yourself, you will have to upload it to ROBLOX using the animation editor.

0
Would the animation work if it was a group animation? If so I can contact him to make it so. jaddae3 2 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

This is not a script error (though im not 100% sure). You might have to go into animation editor and publish the animation as your own. Then use that id in your script

Answer this question