Setup

To enable QACAM in your game you will need to get the Roblox module and insert it into your game.

  1. Create a Script in ServerScriptService

  2. Get the module from the Roblox Creator Store or from GitHub (Also available as a Rojo project)

  3. Place the module inside the script you created in step 1

You now need to configure the module according to your needs. First we are going to allow QA Central's (QAC) QA Leads to join.

Write this code inside the script created in step 1

The following script will kick players if HTTP Service access is not enabled in game settings because it will not be able to interact with the remote QAC API.

AccessManager
-- Require the module
local QACAM = require(script:WaitForChild("QACentralAccessManager"))

-- Allow QA Leads to join at any time
QACAM.configuration:AllowRoles({
    QACAM.configuration.roles.defaults.QA_LEAD
})

-- Validate players when they join
game:GetService("Players").PlayerAdded:Connect(function(Player)
    local AccessResult = QACAM:GetAccessForPlayer(Player)
    
    -- value will be false if the player doesn't have access
    if not AccessResult.value then
        Player:Kick(AccessResult.message)
    end
end)

With the GetAccessForPlayer() function we are telling the module to make a call to the remote QAC API to check if the player meets the roles requirements.

Players who didn't verify their Roblox account will be kicked because the API cannot associate their Roblox user ID to their Discord account.

The game owner will always have access to the game. If the game is owned by a group the group owner will always be allowed to join.

GetAccessResult.message is the message that should be shown to the user if they don't meet the roles requirements. It is possible to customize this message.

Last updated