#Help with attribute

1 messages · Page 1 of 1 (latest)

crimson hare
#

Why does this print done as false when it is true

local part = script.Parent
local handle = script.Parent.Parent
local sound = script.Parent.Parent.sound
local gas = game.Workspace.Events["Gas Check"]
local isDone = gas:GetAttribute("done")

handle.Equipped:Connect(function()
    handle:SetAttribute("holding",true)
    print(isDone)
    if isDone == false then
        sound:Play()
    elseif isDone == true then
        sound.Volume = 0
    end
end)


handle.Unequipped:Connect(function()
    handle:SetAttribute("holding",false)
    sound:Pause()
end)
split meadow
#

Js use boolvalues

crimson hare
#

Wish I thought of that

#

I've been lost in these attributes

#

I have so many

round ether
#

just use variables

#

or oop

crimson hare
#

👌

quick fox
#

mfw nobody ever uses tables / variables to store data properly

swift fog
crimson hare
#

Why wont this detect when filled changes to true ?

clickDetector.MouseClick:Connect(function(player)
    if filled.Value == true then
        print("on")
    elseif filled.Value == false then
        print("off")
    end
end)