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

Why doesn't my GUI work in production mode, But works in Test & Simulation Mode? EDITED/UPDATED POST

(I hope I am doing this correctly) EDIT: Adjusted the script per below specificiations:

wait(1)
local scrollingframe=script.Parent
local user=game.Players.LocalPlayer
repeat wait() until user.Character local char=user.Character
local humanoid=char:WaitForChild("Humanoid")
local anim
function playanim(id)
	if char and humanoid then
		local id="rbxassetid://"..tonumber(id)
		local oldanim=char:FindFirstChild("LocalAnimation")
		if anim then
			anim:Stop()
		end
		if oldanim then
			if oldanim.AnimationId==id then
				oldanim:Destroy()
				return
			end
			oldanim:Destroy()
		end
		local animation=Instance.new("Animation",char)
		animation.Name="LocalAnimation"
		animation.AnimationId=id
		anim=humanoid:LoadAnimation(animation)
		anim:Play()
	end
end
local b1=scrollingframe.Button1
b1.MouseButton1Down:Connect(function() playanim(b1.AnimID.Value) end)
local b2=scrollingframe.Button2
b2.MouseButton1Down:Connect(function() playanim(b2.AnimID.Value) end)
local b3=scrollingframe.Button3
b3.MouseButton1Down:Connect(function() playanim(b3.AnimID.Value) end)

Was not sure about line 08 - Did I do that correctly? The script still works in TEST & SIMULATION mode, But Not Production.

I am still receiving the same issues as before. I am including the output error I get also:

21:26:07 -- Animation "https://www.roblox.com//asset/?id=2321417178&serverplaceid=2333799309" failed to load in "Workspace.Bella_Boopy.LocalAnimation.AnimationId": Animation failed to load 21:26:07 -- Animation "https://www.roblox.com//asset/?id=2318049345&serverplaceid=2333799309" failed to load in "Workspace.Bella_Boopy.LocalAnimation.AnimationId": Animation failed to load 21:26:08 -- Animation "https://www.roblox.com//asset/?id=2318051149&serverplaceid=2333799309" failed to load in "Workspace.Bella_Boopy.LocalAnimation.AnimationId": Animation failed to load

Which is same as before. The errors appear i game when I click the buttons on the GUI, So I feel like that means they are communicating, just not having the desired affect.

Thanks Again! Any/All help is appreciated.

Thanks!

2 comments

1

Is the animations yours? If not, it won't work.

0

Yes, they are. They all work in production and simulation mode, but not game mode.

1 answer

I uploaded the animations to GROUP instead of My Creations and it works now!

Thanks for everyone's help.

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