Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Animation only loading for the person who made it?

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

2 comments

0

normal script or local script?

0

Try trying the game with the actual roblox player not studio. Roblox is having a lot of errors with decals, animations and audio!

2 answers

✓ Accepted answer

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.

1 comment

0

Would the animation work if it was a group animation? If so I can contact him to make it so.

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

This discussion is preserved as it was. New answers, comments, and votes are closed.