LaunchProduct
Launch a specific product on load.
LaunchProduct
(ProductId)
If you have a product details page, this event should switch to the product's details page. This is primarily used for launching directly to a product on join.
Parameters
Field
Type
Description
ProductId
string
the id of the product to launch. you can use this in conjunction with GetProductById.
Example Script
local RS = game.ReplicatedStorage:WaitForChild('InStore');
local RF = RS.Function; --> The InStore RemoteFunction
local RE = RS.Event; --> The InStore RemoteEvent
function LaunchProduct(ProductId)
print(ProductId); --> The requested product id to launch
local Product = RF:InvokeServer('GetProductById', ProductId);
if Product then
-- Launch the product details page
end
end
RE.OnClientEvent:Connect(function(Event, ...)
if Event == 'LaunchProduct' then
LaunchProduct(...); --> Pass the event to the LaunchProduct function
end
end)
Last updated
Was this helpful?