Hello, I made these two scripts but can you tell me why they don’t work? I want that as the part becomes transparent = 0, I want that the value of number and + 6
local part = workspace.Part
local tables = {["Number"] = 45;}
if part.Transparency == 0 then
tables["Number"] = tables["Number"] + 6
end
-- or
if part.Transparency == 0 then
tables.Number = tables.Number + 6
end
i recomend a .changed event if this doesn’t work for you use a while loop
local part = workspace.Part
local tables = {["Number"] = 45;}
part.Changed:Connect(function()
if part.Transparency == 0 then
tables["Number"] = tables["Number"] + 6
print(tables["Number"])
end
end)