change this local currentXP = PlayerData.metadata[xpType] to local currentXP = PlayerData.metadata[xpType] or 0
cause if you don't have xp it returns nil and you get an error.
Error is : SCRIPT ERROR: @qb-crafting/client.lua:108: attempt to compare number with nil
change this
local currentXP = PlayerData.metadata[xpType]tolocal currentXP = PlayerData.metadata[xpType] or 0cause if you don't have xp it returns nil and you get an error.
Error is :
SCRIPT ERROR: @qb-crafting/client.lua:108: attempt to compare number with nil