Yep, namespace conflict: confirmed.
Basically I copied and pasted your code as written and just changed the name of the function to RollDice() in both the lua and the xml and it worked no issue.
Code:
function RollDice()
local num = math.random(1,100)
return num
end
Code:
<OnMouseDown>
Roll = RollDice()
LootDiceRoll:SetText(Roll)
</OnMouseDown>
In my opinion this is not an issue in strict Lua, (nor do other strongly typed interpreted languages suffer from this issue.)
I feel like this arises because the Game compiles the Lua and the XML elements into globally scoped lexical objects. Which in context makes sense why they would apparently conflict on names.