“Attempt to call a nil value” error

I’m creating a UI tweening close and open script and every time I run it brings up:image

Here is what the script looks like,

Most of it is hooked up with module scripts which are provided here:

image
image

Everything else is working BUT this.

Any tips?

can you show me line 80 of the local script

no I said send me line 80, not the whole thing

UI.Tween(Menu.Inner.Background, TweenInfo.new(TweeningDurationIn,Enum.EasingStyle.Quint), {Position = UDim2.new(-0.35, -2, 0, 0)})

could you show me the tween module?
I don’t think UI.Tween is calling a function in the module and that might be the problem

There is two module scripts that coordinate with it
Animator & Tween so ill just show both;

image

image

maybe it is because you return a function in the tween module, never tried returning a function so I might be wrong

have you tried using print to see where code runs?

Can you confirm these methods are actually being injected into the UI module? Can you also confirm that they are injected into the UI module BEFORE you attempt to use the methods? The only issue I can see with this code is that the .Tween simply does not exist in the UI module table.

3 Likes

that’s exactly what I was thinking, hmm