Giving items to testers
The GetAccessForPlayer()
method returns a GetAccessResult which includes a table of matched roles. You can use this information to give certain items to a particular set of players.
The following example demonstrates how to give testers 100 coins.
local testersRoleId = "974356043788337162";
gmae:GetService("Players").PlayerAdded:Connect(function(Player)
local AccessResult = QACAM:GetAccessForPlayer(Player)
-- Verify access here as shown in setup
-- Check if it's the first time joining
-- Give coins
if tale.find(AccessResult.matchedRoles, testersRoleId) then
Player:FindFirstChild("Leaderstats"):FindFirstChild("Coins").Value += 100
end
end)
GetAccessResult.matchedRoles
will only be populated if the player obtained access through Discord roles.
You can take advantage of this feature to jumpstart testers' job or for many other features.
Last updated
Was this helpful?