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

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

Asked by 5 years ago
Edited 5 years ago

(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!

1
Is the animations yours? If not, it won't work. Mr_Unlucky 1085 — 5y
0
Yes, they are. They all work in production and simulation mode, but not game mode. bella_boopy 13 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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

Thanks for everyone's help.

Ad

Answer this question