I’ll get straight to the point. When I use ContentProvider.PreloadAsync on service CoreGui, Roblox blocks it. I and many others use that function to check if an exploiter added inserted an UI into CoreGui. I understand that client sided anti cheats aren’t fool proof, and I agree that they aren’t the best option.
Ever since Roblox has added this restriction to ContentProvider there has been an influx of exploiters in my game. (From one in 2,000 players to now one in almost ten.)
while task.wait(1) do
local found = 0
ContentProvider:PreloadAsync({game:GetService('CoreGui')},function(id,stat)
found += 1
end)
print(found) --ALWAYS outputs 0: when used in Studio OR the player.
end
Am I doing something wrong? Did the API change?
Please tell me if this is a change intentionally on Roblox’s end.
Never the less, I have found preloading the game itself gets the results I need. Preloading a game repeatedly can cause lag, and really just isn’t a great idea. Is there another way to do this without preloading game?
Yes, this was a (horrible) change on Roblox’s end.
They made it so that when you try to retrieve CoreGui from a script with the standard permissions level, it will simply return nil. This means that your code is essentially calling PreloadAsync with {nil}.
iirc a staff member said this was to help prevent exploits, but in no way does it do that because executors just elevate their thread permissions.
afaik there’s no other way to preload CoreGui right now.
Yes!
You are correct. As release 686 states, “game.CoreGui and other restricted instances and services will no longer be accessible in scripts which do not have a permission to use them. Instead, attempt to index or retrieve such an instance from Roblox API method will return ‘nil’.”
(https://create.roblox.com/docs/en-us/release-notes/release-notes-686.)
There most likely is a way to get CoreGui.
Thanks for the help!