Local function issues (attempt to index global self a nil value)(SOLVED)

Hello, I hope everything is well. I’ve been running into some issues when trying to work with some Local functions. I may be ordering them wrong, not sure…

In init I first define self.textbox.
38%20PM

Directly under init, I create this function to animate the node.
27%20PM

I then call show() in the on message function.
37%20PM

I get returned this error.
29%20PM

I think that I’m getting confused whether I should use self. or of I should use local, but I’m not sure. Any insight would be appreciated.

Thanks,
V

Hi there! If I understand correctly your code fragments, you should replace

local function show()

by

local function show(self)

and call it as

show(self)

Ciao!

3 Likes

Much thanks!

This worked very well!

Have a good one!