Shorter way of doing this DataBase2 code?

Hi,

Silly question but is there a shorter way of doing this DataBase2 code?

local DataStore2 = require(game.ServerScriptService:WaitForChild("DataStore2"))

local MoneyTemp = DataStore2("Money", Player)
if MoneyTemp:Get(0) >= Cost then
 -- Do Stuff
end

I fail to see the purpose of shortening this piece of code, can you elaborate?

1 Like