TextButton.Activated event only firing once

I don’t think it has anything to do with the container being tweened. I removed the tween and just tried manually changing the position, it only changes once and that’s it:

CreditsContainer.TextButton.Activated:Connect(function()
    print"click"
    print(IS_CREDIT_SHOP_OPEN)
    if IS_CREDIT_SHOP_OPEN == false then
        IS_CREDIT_SHOP_OPEN = true
        BuyCreditsContainer.Position = UDim2.new(0.163, 0,0.929, 0)
        --BuyCreditsContainer:TweenPosition(UDim2.new(0.163, 0,0.929, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, .7, true)
    else -- this else condition never runs
        IS_CREDIT_SHOP_OPEN = false
        print(IS_CREDIT_SHOP_OPEN)
        print"should be closing"
        BuyCreditsContainer.Position = UDim2.new(-0.26, 0,0.929, 0) 
        --BuyCreditsContainer:TweenPosition(UDim2.new(-0.26, 0,0.929, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, .7, true)
    end    
end)

i think its a deeper problem than the script like some other script running on the GUIS maybe changing parents, maybe those UDim2’s are off screen maybe one of the WaitForChilds is waiting to long or sumn its hard to say

id really have to be there to debug the problem because the code runs prefectly fine for me

After about an hour of testing I finally figured it out. I don’t know why this worked but changing the ZIndex to the CreditsContainer to anything over 1 allowed input to be recieved. (???)

https://gyazo.com/9eec61f8cf4ba31512c473b1de1cac2f

There was technically no collisions going on so it’ll forever by a mystery I suppose.

2 Likes

huh thats very odd but good job you found a soloution ;p