Activation cannot be triggered

image


I set a label on TextButton, why can’t using Activated after obtaining the label trigger it?

Hmmmmm.

Where’s your script located? .Activated can only be fired from the client.

Also, I recommend doing some type checking to make sure the instance is actually a button. Just in case!

local CollectionService = game:GetService("CollectionService")
local Tag = CollectionService:GetTagged("button")

for _, button in Tag do
	if button:IsA("TextButton") or button:IsA("ImageButton") then
		button.Activated:Connect(function()
			print(button.Name.." clicked.")
		end)
	end
end

Does the TextButton have the ‘Active’ property set to true?