#The connections work together

1 messages · Page 1 of 1 (latest)

unborn rampart
#

Hey, i want to make two separated connections for per TextButton but they work together, debounce works together, when a connection disconnected, they all disconnect. How can i separate them?

for _, upgraders in upgradeFrame:GetChildren() do
    
    if not upgraders:IsA("TextButton") then continue end
    
    local levelValue, bar = upgraders.Level, upgraders.Bar
    
    warn(upgraders.Name)
    
    ConnectionUpgraders = upgraders.MouseButton1Click:Connect(function() 
--.............
end)
lunar plinth
#

show more code

unborn rampart
unborn rampart
lunar plinth
#

this is not long and half of it is whitespace / empty lines

unborn rampart
lunar plinth
#

yes

#

would be a lot easier to read if there wasn't an entire empty line between every line with code on it

unborn rampart
#

But i can't edit it

#

It says i should sign up

lunar plinth
#

i can't find where its coming from aside from the fact that they all share the same debounce and there's long waits in the function so it's not that they disconnect, it's just you aren't waiting long enough

#

you also have this ConnectionUpgraders:Disconnect() which only disconnects one of the buttons

unborn rampart
lunar plinth
#

i'm saying it is disconnecting one

#

that's how your code works

#

like i said maybe get rid of all that whitespace so your scrollwheel doesn't hate you 3 months from now