Disabling the Reset Character button

I’ll try my best to explain.

After researching, I found out about it in this post:

If you’ve used SetCore before you may have seen the ‘ has not been registed by the CoreScripts’, this is because the SetCores take time to be initialized therefore you’ll need to pcall it and keep trying.

Here’s a small example:

local success
while not success do
   success = pcall(sg.SetCore, sg, "TopbarEnabled", false)
   wait(1) --add a wait to ensure no Game script timeouts :P
end

As for the function, this is because pcall returns two values: the first one is a bool, whether the function was a success or not. The second is the response: if the first value was a success and you did return in pcall, the response will be the returned value. If it errors, aka success is false, it returns the error message.

2 Likes