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

How do I clone a GUI?

Asked by
Mystdar 352 Moderation Voter
10 years ago

From the ServerStorage into a player's PlayerGui? I have tried:

game.Players.PlayerAdded:connect(function(player)
        player.CharacterAdded:wait() --Waits until the CharacterAdded event has fired.
        wait(1)
        local GUI= game.ServerStorage.PlayerGUI:Clone()
        GUI.parent=player.PlayerGui
    end)

to no prevail.

1 answer

Log in to vote
2
Answered by 10 years ago

The error is on Line 5. You attempt to set the parent of the GUI, when the correct syntax is actually Parent. The "P" has to capitalized.

0
I'll check it out Mystdar 352 — 10y
0
Thanks. Mystdar 352 — 10y
Ad

Answer this question