Int Value not increasing

Hello developers,
After hours of failed attempts, I decided to ask for help in this website.
So I’m making this awakening move that increases your damage multiplier from 1 to 1.2
The damage is multiplied by the value of the Int Value(Damage Multiplier). However, the value does not increase, and it’s still 1.

This is the serverscript that increases the int value,

game:GetService("ReplicatedStorage").Remotes.Combat.DamageMultiplierChange.OnServerEvent:Connect(function(player, number)
	local chr = player.Character
	local DamageMultiplierValue = chr.Values.DamageMultiplier
	
	DamageMultiplierValue.Value = number
end)

And this is the local script that fires the event:

local DamageMultiplierEvent = game:GetService("ReplicatedStorage").Remotes.Combat.DamageMultiplierChange
DamageMultiplierEvent:FireServer(1.2)

Any kind of help would be appreciated.

1 Like

The title says “increasing” but in the script you’re setting the value but not increasing it, if you’re increasing the value replace DamageMultiplierValue.Value = number with DamageMultiplierValue.Value += number.

1 Like

My apologies, I meant to say “change” instead of increasing. I tried your method, however, the Int value did change, but it was not the value I wanted. Instead of “1.2”, it was “2”. Any solution to this?

1 Like

I believe your problem is as follows:
image

I am guessing you are trying to assign a float number to an IntValue try using a NumberValue

2 Likes

This is probably the right answer, however it’s not been written simply so I’ll explain it.

IntValue is a value instance that can only have Integers, which means that you can’t put decimal.

NumberValue on the other hand, can have a decimal in it.

1 Like

Thanks a lot, I’ve learned something new!

1 Like