How to add a gui on a block with code

hello

I am struggling to get a gui on a block with code. I want to make a dice.

Whenever i look up this question it just shows you manually how to put a gui on a block. Does anyone know the code on how to add a gui on a face on a block.

Thank you

2 Likes

Use instance.new("SurfaceGui")?
It creates objects and you can edit these objects to do whatever u want.

2 Likes

If you already have the Gui but need to put the Gui on part then:

Gui  = game.Lighting.Gui -- Location of your Gui
Part = workspace.Part    -- Location of your part

Gui.Parent = Part        -- Puts Gui inside the part
2 Likes