I have a script where whenever an event is fired I get rebirth value * 0.1 added to a MaxHealth IntValue but the problem is that the rebirth value isnt getting divided and stops working, the script is below
local event = game.ReplicatedStorage.Pushup
local debounce = false
event.OnServerEvent:Connect(function(player)
local leaderstats = player.leaderstats
local MogPoints = leaderstats.MogPoints
local MewStrength = leaderstats.MewStrength
local Character = player.Character
if debounce == false then
debounce = true
player.leaderstats.MaxHealth.Value += (leaderstats:WaitForChild("MewStrength").Value * 0.1)
wait(0.15)
debounce = false
end
end)
As @anon81993163 mentioned, you cannot assign a non int value (a float) to an integer value. Just switch the integer value objects to number value objects and it should work