local plr = game.Players.LocalPlayer
while true do
wait()
for i ,v in pairs(plr.PlayerGui["Build Menu"].Frame.ScrollingFrame:GetChildren()) do
print("COOLBEFOREFIRST")
if v.ClassName == "TextButton" then
print("COOLFIRST")
v.MouseButton1Click:Connect(function()
print("COOL")
local itemvalue = plr.PlayerGui["Build Menu"].Frame.Item.Value
itemvalue = v.Parent.Name
end)
end
end
end
So how do I check if any of the gui buttons inside scrollingframe gets clicked because this doesn’t work. The buttons will get parented later so the buttons are unknown. Please help.