Ok I've been at this a while lol. Trying different things but nothing is seeming to work. I will link the code how I have it now. If you can could you fix the error and then link the entire code back to me exactly how I have the code here with the fix in it? This will help me better understand where exactly I'm messing up.
XML
Lua Code:
<GuiXml>
<Controls>
<TopLevelControl name="LootDice" mouseEnabled="true" movable="true">
<Dimensions x="200" y="42" />
<Anchor point="CENTER" />
<OnMouseDown>
Roll = LootDiceRoll()
LootDiceRoll:SetText(Roll)
</OnMouseDown>
<Controls>
<Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" />
<Label name="$(parent)Roll" font="ZoFontWindowTitle" color="CFDCBD" wrapMode="ELLIPSIS" verticalAlignment="CENTER" text="LootDice: " >
<AnchorFill />
</Label>
</Controls>
</TopLevelControl>
</Controls>
</GuiXml>
LUA
Lua Code:
function LootDiceRoll()
local num = math.random(1,100)
return num
end