Currently both Instance:GetAttributeChangedSignal and Instance.AttributeChanged don’t work when I test them, I was testing them by using the code below:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
ReplicatedStorage:SetAttribute("test",false)
local test = ReplicatedStorage:GetAttribute("test")
ReplicatedStorage:GetAttributeChangedSignal("test"):Connect(function() -- doesn't work
print("hmm")
end)
ReplicatedStorage.AttributeChanged:Connect(function(attributeName) -- doesn't work
print(attributeName)
if attributeName == "test" then
print("hmm")
end
end)
print(test) -- prints 'false'
test = true
print(test) -- prints 'true'
Does anyone know if they are disabled at the moment or if there’s something wrong with the code?
Since this is part of ReplicatedStorage, you are probably listening for client changes server-side, so that’s why it doesn’t work. And @PrismaticFruits is right, you can’t set attributes to services. Server-side ReplicatedStorage is individual replica, as well as client-side storage. Are you sure you are really changing attributes?
im thinking that this will just return the value and when you change it, the attribute wont change, but the value of the variable will. This is just my guess