So I'm trying to make a script that when the Miles Driven [in leaderstats] is changed it fires a remote event to another script to check its value. If the value exceeds a limit it Ranks the player up. Everything seem to be working fine except the value in the if statement. It gives an error in the output: Attempt to compare boolean with number.
Here's the code:
local Event = game:GetService("ReplicatedStorage").RankUpServer
Event.OnServerEvent:Connect(function(player)
print('Event connected')
if player.leaderstats["Miles Driven"].Value >0<1 then
player.leaderstats.Rank = "Permit"
elseif player.leaderstats["Miles Driven"].Value >1<10 then
player.leaderstats.Rank = "Novice"
elseif player.leaderstats["Miles Driven"].Value >9<25 then
player.leaderstats.Rank = "Intermediate"
elseif player.leaderstats["Miles Driven"].Value >24<50 then
player.leaderstats.Rank = "Advanced"
elseif player.leaderstats["Miles Driven"].Value >49<51 then
player.leaderstats.Rank = "Semi Pro"
elseif player.leaderstats["Miles Driven"].Value >50 then
player.leaderstats.Rank = "Pro"
end
end)
Also the reason >49<51 looks like that I can't just do == 50 because it's suppose do be mile driven in a drag strip and it's 1/4 mile, so when the player races Miles driven get 0.4 added to it so I can't go with ==.

2 comments
You really dont want to be using if statments like this it will end up in a mess. I would use a table that holds the rank and text. A linked list would probably be best.
https://developer.roblox.com/articles/Linked-list