Animation doesnt play on publish

i have animation gamepass gui and for some reason the animation play when i test it on studio but when i publish it and get into the game the animation doesnt play.

animation script(local script):

local anims = script:WaitForChild("Animations"):GetChildren()

local templateBtn = script:WaitForChild("AnimButton")


local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")


local currentAnim = nil


for i, anim in pairs(anims) do
	
	
	local loadedAnim = humanoid:LoadAnimation(anim)
	loadedAnim.Looped = true
	loadedAnim.Priority = Enum.AnimationPriority.Action
	
	
	local templateClone = templateBtn:Clone()
	templateClone.Text = anim.Name
	
	templateClone.Parent = script.Parent.AnimationsScroll
	
	
	templateClone.MouseButton1Click:Connect(function()
		
		if currentAnim ~= loadedAnim then 
			
			if currentAnim then currentAnim:Stop() end
			
			currentAnim = loadedAnim
			currentAnim:Play()
			
			
		elseif currentAnim == loadedAnim then
			
			currentAnim:Stop()
			currentAnim = nil
		end
	end)
end

model: Animation Gui - Roblox

At quick glance on break, I’ve had the issue if the animation ID owner does not match the group or player that published the game. The game publisher has to match the person or group the animation is published under.

2 Likes

so what i need to do to fix the problem?

You would need to upload the animation to roblox using the same publisher location. Open animation editor, load the animation you want and then export to roblox. From there you can choose to publish it to your user name or any of the groups you are in. Publish it to the same place the game will be which should be your user account by default.

For example I have some games published in my group SketchCat studios. The animations for those games must be published under SketchCat studios. The games in my normal solo area would have to be published to my regular name and not the group. Hope that helps and hope that was the issue. Sorry for the late reply.

1 Like

i fix the problem already thanks

1 Like