So I’m trying to make this roblox fishing rod script with rarity is based how much a guy fished. I’ve tried redoing the rarity part but it thinks that Value.Full
which is set to 1 is a increment of 20 which is Config.Server.RarityModeConfig.Increment.Full.VeryRare
. I’ve tried using IncrementOf(1,20)
It returned false but for some reason when i use variables/values it thinks there true.
Part of the script that doesn’t work
function IncrementOf(valtocheck,inc)
local valueToCheck = valtocheck
if valueToCheck % inc == 0 then
return true
else
return false
end
end
if IncrementOf(Full.Value,Config.Server.RarityModeConfig.Increment.Full.VeryRare)==true then
print(IncrementOf(Full.Value,Config.Server.RarityModeConfig.Increment.Full.VeryRare))
MoneyVal.Value=MoneyVal.Value+Config.Server.Prices.Rare
remotes.FishInfo:InvokeClient(plr,GetRandomFish(3),Config.Server.Prices.VeryRare)
elseif IncrementOf(Full.Value,Config.Server.RarityModeConfig.Increment.Full.VeryRare)==false then
MoneyVal.Value=MoneyVal.Value+Config.Server.Prices.Common
remotes.FishInfo:InvokeClient(plr,GetRandomFish(1),Config.Server.Prices.Common)
print('got common')
end
here’s the link to the model (the server side would be too long to paste) Note you need a leaderstat value called Cash