What do you want to achieve? Keep it simple and clear!
Get rid of errors
What is the issue?
Attempt to perform arithmetic (sub) on boolean and number
What solutions have you tried so far?
nothing
Module Script:
game.ReplicatedStorage.Remotes.Bank.OnServerEvent:Connect(function(bType, val)
if bType == 1 then
local dift = val - bankValues.Bank -- Problem here
bankValues.Bank = val
bankFrame:SetValue("$" .. ShortenNumber(bankValues.Bank), dift)
bankFrame:SetExactValue("$" .. bankValues.Bank)
else
local dift = val - bankValues.Cash -- also too problem here
bankValues.Cash = val
cashFrame:SetValue("$" .. ShortenNumber(bankValues.Cash), dift)
cashFrame:SetExactValue("$" .. bankValues.Cash)
end
end)