See this code…
local function draw_a_die(posx, posy, sizex, sizey, contents, guiname)
math.randomseed(socket.gettime()*10000)
local die = gui.new_box_node(vmath.vector3(posx,posy,1), vmath.vector3(sizex,sizey,1))
gui.set_color(die, vmath.vector4(1.0,1.0,1.0,1.0))
local dielabel = gui.new_text_node(vmath.vector3(posx,posy,1), math.random(1,6))
gui.set_color(dielabel, vmath.vector4(0.0,0.0,0.0,1.0))
gui.set_font(dielabel, "NormalSans1LARGE+")
gui.set_parent(dielabel, die)
gui.move_above(dielabel, die)
gui.set_id(die, guiname)
end
if you remove gui.move_above the number disappears
if you then remove the set_parent the number appears
just to be sure using keep scene transform value doesn’t matter
What is the relationship between parenting an object and Z value?
Obviously I can get this to work but in my way of thinking setting the parent wouldn’t have necessitated the moving the text node above the box node.