:GetAttributeChangedSignal doesn't fire at all

  1. What do you want to achieve?
    choose clothing in your inventory

  2. What is the issue?
    :GetAttributeChangedSignal doesn’t work at all

  3. What solutions have you tried so far?
    tried to use .AttributeChanged

-- script setting the attribute value
script.Parent.MouseButton1Down:Connect(function()
	print(1)
	ChosenClothingFrame:SetAttribute("chosenclothing", 1)
end)

-- script checking if a cloth was selected
frame:GetAttributeChangedSignal("chosenclothing"):Connect(function()
    print("clothing")
end)

both scripts are local, and in different scripts

Run a temporarily while loop printing the attribute value, seeing if it actually changes. This will single out some possible issues.

I’m guessing you mismatched your variables since you’re applying the attribute to something called “ChosenClothingFrame” but you’re listening for the signal on something simply referred to as “frame”. Judging purely from the little bits of the code that we can see, shouldn’t it maybe be ChosenClothingFrame:GetAttributeChangedSignal() instead?

Thanks! That was a issue i didn’t notice…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.