#how is that even possible

1 messages · Page 1 of 1 (latest)

copper basin
#
local function selectAnimations()
    for i, textButton in textButtons do
        textButton.MouseButton1Click:Connect(function()
            local enabled = textButton.Parent:GetAttribute("enabled")
            print(enabled)
            if enabled then
                textButton.Parent:SetAttribute("enabled", false)
                textButton.disableColor.Enabled = true
                textButton.enableColor.Enabled = false
            else
                textButton.Parent:SetAttribute("enabled", true)
                textButton.disableColor.Enabled = false
                textButton.enableColor.Enabled = true
            end
        end)
    end
end

It prints false and in the same frame it prints true ???

#

why the hell does the function run twice