this is very weird
all the prints run, the starting value of damageTweak
is 1, so it should be 1.1, but it isn’t?
-- loop through gameplay values to find the intvalue
for _, value: IntValue in gameplayValues:GetDescendants() do
if value.Name ~= assignedValue then continue end
local traitBuff: number
for i, value in traitStats[trait] do
if typeof(value) == "number" then
traitBuff = value
break
end
end
warn("Applying " .. trait .. " to " .. value.Name .. " with buff value of " .. traitBuff)
if traitStats[trait].isMultiply then
if remove then
value.Value /= traitBuff
warn(value.Value)
else
value.Value *= traitBuff
warn(value.Value)
warn(value.Parent)
warn(value.Parent.Parent)
warn(value.Parent.Parent.Parent)
end
else
if remove then
value.Value -= traitBuff
else
value.Value += traitBuff
end
end
end