Values beyond 10T not functioning

I have a game of force simulator, and I created this script to set the lives of Dummys, the table works however when it reaches 10T upwards it returns an error

SetHealth = {
['Human Dummy [300]'] = {100,794.7/1.5,1};
['Super Human Dummy [3k]'] = {1000,794.7/1.3,1};
['Master Human  Dummy [30k]'] = {10000,794.7/1.2,1};
['Boss Human Dummy [100k]'] = {100000,794.7,1};

['Hunter Dummy [500k]'] = {500000,794.7,2};
['Boss Hunter Dummy [5M]'] = {5000000,794.7,2};

['Zombie Dummy [25M]'] = {25000000,794.7,3};
['Boss Zombie Dummy [75M]'] = {75000000,794.7,3};

['Doctor Dummy [150M]'] = {150000000,794.7,4};
['Boss Doctor Dummy [450M]'] = {450000000,794.7,4};

['Military Dummy [1B]'] = {1000000000,794.7,5};
['Boss Military Dummy [10B]'] = {10000000000,794.7,5};

['Spy Dummy [50B]'] = {50000000000,794.7,6};
['Boss Spy Dummy [150B]'] = {150000000000,794.7,6};

['Send Monster Dummy [1T]'] = {1000000000000,794.7,7};
['Boss Send Monster Dummy [10T]'] = {10000000000000,794.7,7};

['Ice Warrior Dummy [30T]'] = {30000000000000,794.7,8};
['Boss Ice Warrior Dummy [100T]'] = {100000000000000,794.7,8};

['Lava Monster Dummy [350T]'] = {350000000000000,794.7,9};
['Boss Lava Warrior Dummy [1Qd]'] = {1000000000000000,794.7,9};
}

local function ChangeHealthDummy(Dummy)
local BaseHealth = SetHealth[Dummy.Name][1]
local MultHealth = SetHealth[Dummy.Name][2]
local MultArea = SetHealth[Dummy.Name][3]

local MHealth = ((BaseHealth*MultHealth)*MultArea)

Dummy.Humanoid.MaxHealth = MHealth/100000
Dummy.Humanoid.Health = Dummy.Humanoid.MaxHealth
print(Dummy.Name,ConverValues:ConvertShort(Dummy.Humanoid.MaxHealth))
wait()
end

for	i,v in pairs(workspace.Dummys:GetChildren()) do
	v.ChildAdded:Connect(function(Dummy)
		ChangeHealthDummy(Dummy)
	end)
	for	i,v in pairs(v:GetChildren()) do
		ChangeHealthDummy(v)
	end
end

Screenshot_8

1 Like

That’s because Humanoid.MaxHealth is a float value, which is 32-bit (max of 2,147,483,647) afaik. You could work around it by scaling back the health and the damage you do respectively which achieves the same effect.

1 Like

I did it and keep getting the same error

1 Like

I divided the damage and life by 1Qd and msm so I get an error

From what I gathered from your output, I would say that 'Ice Warrior Dummy [30T]' could not be found inside workspace.Dummys. But can you take a screenshot of your folder and the children inside it?

1 Like

Screenshot_9

it seems to me that the problem was this, because it is working perfectly now, thank you all

You be nice to mark as the solution but no problem!

1 Like