Insource Systems
  • Intro
  • Change Log
  • API Reference
  • Insource Bot
    • Getting Started
    • Commands
      • Settings
      • Moderation
      • Info
      • Account
      • InStore
  • InStore
    • Getting Started
      • Linking Your Account
      • Create Your Store
      • Create a Product
    • Framework
      • RemoteEvent
        • Alert
        • LaunchProduct
      • RemoteFunction
        • GetCurrentUser
        • GetProductById
        • GetProducts
        • RequestPromptPurchase
      • Resources
        • Configuration
        • Product
        • Theme
        • User
      • Utils
        • TeleportToAccount
        • TimeStringToEpoch
    • API Resources
      • License
      • Product
      • Store
  • API Resources
    • User
Powered by GitBook
On this page

Was this helpful?

  1. InStore
  2. Framework
  3. RemoteEvent

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

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)
PreviousAlertNextRemoteFunction

Last updated 1 year ago

Was this helpful?

the id of the product to launch. you can use this in conjunction with .

GetProductById