Animation script won't work on PC or Mobile

Hello, I have this script that doesn’t work on PC or Mobile. In studio it works but, on the website, it won’t work.
Here’s the script

local plr = game:GetService("Players").LocalPlayer
local anims = {script.Parent:WaitForChild("Anim"), script.Parent:WaitForChild("Anim")}
	--script.Parent:WaitForChild("Anim")

local loadedAnims = {}
local tool = script.Parent
local animator
local debounce = true
local del = 1 --The cooldown between each click

--Connections:


--Click animation:
tool.Activated:Connect(function()
	if(debounce) then --Setting up the debounce (cooldown)
		debounce = false
		animator = plr.Character:WaitForChild("Humanoid"):WaitForChild("Animator") --Find the animator object
		if(not loadedAnims[2]) then --If the animation didn't exist yet
			loadedAnims[2] = animator:LoadAnimation(anims[2]) --Load it
		end
		loadedAnims[2]:Play() --Play it

		wait(del) --Wait the cooldown
		debounce = true
	end
end)

tool.Unequipped:Connect(function()
	if(loadedAnims[2]) then --If the click animation was loaded
		loadedAnims[2]:Stop() --Stop it once the tool is unequipped
	end
end)


It was made by “Lightning TNT” on YouTube.
But I modified it to fit my game.

Video 1 (In studio)

Video 2 (In game)

Simple fix, if you said you are not getting errors.

When uploading/creating a new animation, MAKESURE it is UNDER/OWNED/CREATED by where ever your game is located.

This includes, if you have a game under your name, and its your game. You would publish the animation to “Me”.

Though if it is under a group game, you would do “Group Name” then publish.

Roblox Game Animations only work in the game/area they are created in.
image

1 Like

Thank you, I’ve tried to fix it but forgot about ownership

1 Like