Getting from table returning nil

I have a script that gets something random based on a players score. Its for when a player fishes, so it gets a fish from the table that is from their score.

The way the score is calculated, the score can be up to 1.9 and down to 0.1. 1.0 is the best score. To make it out of 1, if the score is over 1.9 I do some math to make it under 1.

	FishingJob[plr.Name].totalEffiency = FishingJob[plr.Name].totalEffiency + math.floor(plr.PlayerGui:WaitForChild("GUI").reelBar.castLine.Position.X.Scale*10)/10
	local score
	if FishingJob[plr.Name].totalEffiency > 1 then
		score = 1.9 - FishingJob[plr.Name].totalEffiency
		score = score + 0.1
	end
	if FishingJob[plr.Name].totalEffiency < 1 then
		score = FishingJob[plr.Name].totalEffiency
	end
	if FishingJob[plr.Name].totalEffiency == 1 then
		score = 1
	end

When I try to print what fish are available for that score, I get nil. This only happens if the score is over 1 and needs math done to it.

	print(FishingJob["Fish"][score])
        --returns nil

Heres the table that I’m using

local FishingJob = {
	["Fish"] = {
		[0.1] = {
			["fish1"] = 1 --how much money you get						
		},
		[0.2] = {
			["fish2"] = 1	
		},
		[0.3] = {
			["fish3"] = 1	
		},
		[0.4] = {
			["fish4"] = 2	
		},
		[0.5] = {
			["fish5"] = 2	
		},
		[0.6] = {
			["fish6"] = 2	
		},
		[0.7] = {
			["fish7"] = 3	
		},
		[0.8] = {
			["fish8"] = 3	
		},
		[0.9] = {
			["fish9"] = 3	
		},
		[1] = {
			["fish10"] = 5
		}
	}
}

Score probably isn’t a key, check what score is printing out.

When I print the score, every time it prints a valid key. I double checked to make sure they were the exact same thing (no extra spaces or anything), and they are identical

The score is a number and not a string right? Try doing this.

print(FishingJob["Fish"][tonumber(score)])

Just tried it, it still gives me nil.

I ran your exact code and it works for me so uh, IDK.