Attribute Not Changing [Solved]

So i have a very nice hunger system … however, im trying to stop the depletion of the food/water when this Attribute on the humanoid is set to True. It works when i change it manualy: https://gyazo.com/d75c15c3214620f8160482c73ecd0b27 But when i try to use a script it doesnt change

This is the script i use to try and change it:

local Lobby = plr.Character.Humanoid:GetAttribute(“Lobby”)
print(Lobby)
if Lobby == true then
Lobby = false
end
print(Lobby)

its a Local in StarterCharacterScript among other things.
It prints True which is fine but then it prints False and the Attribute remains True:
https://gyazo.com/4075218d8698397d9c0ad147eacafe1d

Any help would be much appreciated, ThankYou.

I found the solution myself :slight_smile: , i needed to use another function called SetAttribute() Instead of trying to set it by doing Lobby = false

plr.Character.Humanoid:SetAttribute(“Lobby”, true)

i spent 2 days to fix this T_T and fixed it myself right before i posted this

Hey there,

You can mark your answer as the solution - which will allow more people to create help posts and close this.

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