local button = v:FindFirstChildOfClass("TextButton") or v:FindFirstChildOfClass("ImageButton");
warn(`{v.Name} setup., Button Parent: {button.Parent.Name} | Button Name: {button.Name} | Button Class Name: {button.ClassName}`)
button.MouseButton1Click:Connect(function()
warn(`{v.Name} clicked!`)
self: openFrame(v);
end)
The warning where I put all the information, warns Upgrades setup., Button Parent: Upgrades | Button Name: Button | Button Class Name: TextButton but the 2nd warn isn’t warning when I click.
if not v:IsA("TextButton") and not v:IsA("ImageButton") then continue end
local button = v
warn(`{v.Name} setup. Button Parent: {button:GetFullName()} | Button Name: {button.Name} | Button Class Name: {button.ClassName}`)
button.MouseButton1Click:Connect(function()
warn(`{v.Name} clicked!`)
self:openFrame(v);
end)
break
My guess is that it had something to do with FindFirstChildOfClass. Note that I was running this in a GetDescendants loop of a ScreenGui to test it.