Roblox SDK
Use this section to review required setup functions and examples for the Roblox SDK.
Refer to the Getting started section for a for installation information.
Calling into Gamebeast from Roblox
-- Server Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Gamebeast = require(ReplicatedStorage:WaitForChild("Gamebeast"))
Gamebeast:Setup({
key = "abcd-efgh-1234-5678",
})
-- Client Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Gamebeast = require(ReplicatedStorage:WaitForChild("Gamebeast"))
Gamebeast:Setup()
SDK Usage Considerations
Do not clear the shared
global table.
Gamebeast’s Roblox SDK uses shared.GBMod
to fetch modules within its internal framework. Clearing this table will result in the SDK erroring during startup.
It’s okay to add additional entries to shared
as long as GBMod is not overwritten.
It is unsafe to change the SDK’s source.
The SDK is designed to be a black box, modifying its source code can lead to unexpected behavior. Changes will not be preserved when the plugin updates the SDK. If you’re interested in additional functionality, please reach out.
SDK Methods
local Gamebeast = require(game:GetService("ReplicatedStorage"):WaitForChild("Gamebeast"))
:Setup(setupConfig)
→ void
This function must be called once on the server and client to initialize the Gamebeast SDK.
Attempting to call any other SDK method before calling :Setup
will result in an error.
setupConfig
ServerSetupConfig?
The required config table for the SDK.
Types
type SDKSettings = {
-- Enables SDK warnings for API misuse, internal errors, etc.
sdkWarningsEnabled : boolean,
-- Enables stack trace inclusion with warning messages.
includeWarningStackTrace : boolean,
}
type ServerSetupConfig = {
key : string | Secret,
sdkSettings : SDKSettings?
}
Usage
-- Server
Gamebeast:Setup({
key = "abcd-efgh-1234-5678",
sdkSettings = {
sdkWarningsEnabled = true,
includeWarningStackTrace = false,
}
})
-- Client
Gamebeast:Setup()
if sdkSettings
is not provided, the following are the defaults that will be used.
{
sdkWarningsEnabled = true,
includeWarningStackTrace = false,
}
:GetService(serviceName)
→ GamebeastService
This method will attempt to fetch a service module from the Gamebeast SDK. All available services can be found documented here.
serviceName
string
The name of the SDK service.
Usage
GamebeastMarkers = Gamebeast:GetService("Markers") :: Gamebeast.MarkersService