After looking through the CoreScript for a few seconds, the problem is obvious.
The CoreScript IS reading from the SetCore method and applying it to the isAvatarContextMenuEnabled
variable, but the DEBUG_MODE variable overrides it. DEBUG_MODE’s value is tied to RunService:IsStudio()
AvatarContextMenu.lua
-- OPTIONS
local DEBUG_MODE = game:GetService("RunService"):IsStudio() -- use this to run as a guest/use in games that don't have AvatarContextMenu. FOR TESTING ONLY!
local isAvatarContextMenuEnabled = false
StarterGui:RegisterSetCore("AddAvatarContextMenuOption", function(...) QueueSetCoreMethod("AddAvatarContextMenuOption", {...}) end)
StarterGui:RegisterSetCore("RemoveAvatarContextMenuOption", function(...) QueueSetCoreMethod("RemoveAvatarContextMenuOption", {...}) end)
local hasTrackedAvatarContextMenu = false
StarterGui:RegisterSetCore("SetAvatarContextMenuEnabled",
function(enabled) isAvatarContextMenuEnabled = not not enabled
if isAvatarContextMenuEnabled and not hasTrackedAvatarContextMenu then
hasTrackedAvatarContextMenu = true
AnalyticsService:TrackEvent("Game", "AvatarContextMenuEnabled", "placeId: " .. tostring(game.PlaceId))
end
end
)