GetProducts

Get all products enabled for the store.

InvokeServer ('GetProducts', limit, sortby)

Get all products enabled for the store. Returns an array of Product objects. The array will be empty if there are no products.

Parameters

Field
Type
Description

limit

?integer

a positive integer limiting the number of results returned

sortby

?string

a sort method

Sort Methods

Value
Description

idLH

(default) sort by id low to high. this will sort by oldest products to newest products.

idHL

sort by id high to low. this will sort by newest products to oldest products.

Example Script

local RS = game.ReplicatedStorage:WaitForChild('InStore');
local RF = RS.Function; --> The InStore RemoteFunction

local Products = RF:InvokeServer('GetProducts'); --> All products sorted idLH
local ProductsNewOld = RF:InvokeServer('GetProducts', _, 'idHL'); --> All products sorted idHL
local SixNewestProducts = RF:InvokeServer('GetProducts', 6, 'idHL'); --> 6 of the newest products sorted idHL.

Last updated