How to wait until resetbuttoncallback has loaded?

So in my game i want to disable players reset button and this usually works. But if i for example test the game in studio with 2 or more clients it takes time to load and this happens:
GetCore: ResetButtonCallback has not been registered by the CoreScripts

I tried doing this:
repeat task.wait() until player:FindFirstChild("PlayerGui")
it didnt work.
I also tried this:
repeat task.wait() until StarterGUI:GetCore("ResetButtonCallback")
And i just get the same error instead.

How can i wait until resetbuttoncallback has loaded so that i can disable it?

nvm fixed it using pcall, lowk forgot pcalls existed

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.