numbervalue say INF and stuck at 9N how do i fix this i tried IntValue and only stays at 9qn i dont know how to do big integers if you dont know what big integers are its gonna cross to +N and +qn This is only leaderstats script and if you know about big integers pls help dm me Taki#4560

local DSService = game:GetService("DataStoreService"):GetDataStore("Normalslots")

game.Players.PlayerAdded:connect(function(player)
 local uniquekey = "id-"..player.userId
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player

	local Clicks = Instance.new("NumberValue")
	Clicks.Name = "Clicks"
	Clicks.Value = 0
	Clicks.Parent = leaderstats

	local Prestiges = Instance.new("NumberValue")
	Prestiges.Name = "Prestiges"
	Prestiges.Value = 0
	Prestiges.Parent = leaderstats

	local Coins = Instance.new("NumberValue")
	Coins.Name = "Coins"
	Coins.Value = 0
	Coins.Parent = leaderstats

	local Class = Instance.new("NumberValue")
	Class.Name = "Class"
	Class.Value = 0
	Class.Parent = leaderstats

	local GetSaved = DSService:GetAsync(uniquekey)
	if GetSaved then
		Clicks.Value = GetSaved[1]
		Prestiges.Value = GetSaved[2]
		Coins.Value = GetSaved[3]
		Class.Value = GetSaved[4]
	else
		local NumbersForSaving = {Clicks.Value, Prestiges.Value, Coins.Value, Class.Value}
		DSService:SetAsync(uniquekey,NumbersForSaving)
	end
end)

game.Players.PlayerRemoving:connect(function(player)
	local uniquekey = "id-"..player.userId
	local Savetable = {player.leaderstats.Clicks.Value, player.leaderstats.Prestiges.Value, player.leaderstats.Coins.Value, player.leaderstats.Class.Value}
	DSService:SetAsync(uniquekey,Savetable)

end)

5 comments

0

Well, are you manually setting the values of the integers or is it by system (error)?

0

no errors the thing is i can turn my game to public if numvalue stays at 9N or turns into INf

0

According to statement by roblox, IntValue can store upto -2^63 to 9.2 quintillion. NumberValue can store upto -9,007,199,254,740,992 to 2^53 or 9,007,199,254,740,992. Attempt to store values over the limit may result in Interger Overflow. It is similar to that, when you try 'Stack Overflow' in CPU which errors as Segmentation error, done by Hex: 41414141 or AAAA.

0

i found this big integer in devforum and i dont know how to use it