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

Help with this custom command from kohls admin? (moving gui to playergui)

Asked by 3 years ago
    {{'epl'},{'epl sb'},2,{},function(pl,args)
        local x = game.ReplicatedStorage:WaitForChild("epl"):Clone() 
        x = game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui')
    end},

So what I am trying to do is move a GUI I made from replicated storage to everyones startergui

When I run this code in chat which is ":epl" it doesnt show up and it doesnt go to the startergui

Not sure if this requires a remote event or something but

Please help thanks

0
You didn't set the Parent property. You instead re-allocated 'x' as the PlayerGui lmao. Ziffixture 6913 — 3y

1 answer

Log in to vote
0
Answered by
A_Mp5 222 Moderation Voter
3 years ago
{{'epl'},{'epl sb'},2,{},function(pl,args)
--you accidentally set the 'x' variable to playergui instead i made x's parent set to playergui
    local x = game.ReplicatedStorage:WaitForChild("epl"):Clone() 
    x.Parent = game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui')
end},
Ad

Answer this question