How to extract the value of the variable from the function? e.g. I want to get value from “levelUp” and input it in the new variable outside the function.
local function push()
tapCount = tapCount + 1
tapText.text = tapCount
if tapCount == 5 then
levelUp = levelUp + 1
levelValue.text = levelUp
tapCount = 0
end