Script is not changing int value

Title is pretty self explaining.

Events.Purchase.OnServerInvoke = function(player,name)
	local value = player:FindFirstChild(name)
	
	if value then
		local money = (startedPrice*value.Value)*stageMultiplier
		if player.Money.Value >= money then
			player.Money.Value -= money
			value.Value += 0.1 -- this line
			
			return true
		end
	end
end

script is not changing value.
i tried to replace
value.Value += 0.1
with
player:FindFirstChild(name).Value += 0.1

still dont work

value is INT

no errors in output

An IntValue stores an integer, which are whole numbers and can’t store decimal points. You want to use a NumberValue instead.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.