game.Players.PlayerAdded:Connect(function(player)
local stats = player:WaitForChild("Stats")
local boost = 1
local cash = stats:WaitForChild("Cash")
local multi = stats:WaitForChild("Multiplier")
local reb = stats:WaitForChild("Rebirth")
local pres = stats:WaitForChild("Prestige")
local met = stats:WaitForChild("Meteory")
while wait(0.05) do
local function checkValue(valueObject)
local values = valueObject.Value
return math.clamp(values, 1, math.huge)
end
local rebLog = math.log(checkValue(reb * 0.2))
local presLog = math.log(checkValue(pres * 1.85))
local metLog = math.log(checkValue(met * 7.5))
boost = rebLog + presLog + metLog
boost = math.abs(boost)
if boost < 1 then
boost = 1
end
print(boost)
if multi.Value >= 1 then
cash.Value += 2 * boost * 3*multi.Value
else
cash.Value += 2 * boost
end
end
end)
It’s located in ServerScriptService as a script, why do I get this error?
reb is an object. You cannot multiply it.
You have to do reb.Value to multiply it; however, that’ll break your checkValue function, as that expects an object.