Need help with clone script in UI

My script clones the UI but it doesn’t make it visible, below is what it looks like in workspace and what my script looks like


You’re adding the GUI into StarterGUI, but the StarterGUI is already replicated to the player. You need to access PlayerGui and add it there.

1 Like


I got an error

You need to reference PlayerGUI.
Add this at the top.

local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild('PlayerGui')

Also make sure to change it to playerGui in the script.

1 Like


it still shows up with the same error, i’m confused

It’s just playerGUI.Blocks, not game.playerGui.Blocks.

1 Like

i still don’t understand. I changed the “playerGui” after game. on line 7 to playerGUI and it still doesn’t work

My bad it’s playerGui.Blocks without game, i typed it wrong.