Leaderstats not changing

I’m trying to make a script where the player’s stats get up buy 1.05%. For some reason, it doesn’t work though, does anyone know why? Thanks.


function Multiplier(player, cashInt)
	local cash = player:WaitForChild("leaderstats"):WaitForChild("Cash")
	local multipler = player:WaitForChild("Upgrades"):WaitForChild("Multiplier")
	local price = multipler:WaitForChild("MultiplierPrice")

	if cashInt > cash.Value then
--		return "Hack"
	elseif cash.Value >= price.Value then
		cash.Value -= price.Value
		local newPrice = math.floor(price.Value * 1.5)
		price.Value = newPrice
		print(multipler.Value)--This prints 1
		multipler.Value *= 1.05
		print(multipler.Value)--This prints 1
		return true
		return false


That’s probably because your value is an IntValue. IntValues do not support decimals, so you may want to change the multiplier instance to be NumberValue.

Oh, makes sense! Thanks!!!