generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: SetCoreEnabled()

Previous Thread :: Next Thread 
Ripull is not online. Ripull
Joined: 21 Jul 2008
Total Posts: 14249
24 May 2014 02:15 PM
Anyone notice that this doesn't work very well under latency issues?
Usually, the player's backpack GUI half forms on respawn after calling this method.


I'm trying to make a fool-proof disabler, that disregards latency and just gets its job done. Can I get some help to make this less likely to fail?



repeat wait() until game.Players.LocalPlayer.Character and game.Players.LocalPlayer.PlayerGui


function Clear()

local StarterGui = Game:GetService("StarterGui");

Settings = {
false,--PlayerList
false,--Health
false,--Backpack
false}--Chat


--[[StarterGui:WaitForChild("Health");
print'passed 1'
StarterGui:WaitForChild("Backpack");
print'passed 2'
StarterGui:WaitForChild("Chat");
print'passed 3'
StarterGui:WaitForChild("PlayerList");
print'passed 4']]--

for _,i in pairs(Settings) do
StarterGui:SetCoreGuiEnabled(_-1,i);
end

end
Clear()
Report Abuse
Devoi is not online. Devoi
Joined: 09 Jun 2013
Total Posts: 5387
24 May 2014 02:16 PM
set them all to true first, have a small delay, then set whichever ones you want to false.
Report Abuse
Ripull is not online. Ripull
Joined: 21 Jul 2008
Total Posts: 14249
24 May 2014 02:18 PM
Why should I set them to true first, when by default they are true?
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
24 May 2014 02:18 PM
Lol,why is this so long exactly?

Localscript in startergui

while wait() do
game.StarterGui:SetCoreGuiEnabled("All",false)
end
Report Abuse
Ripull is not online. Ripull
Joined: 21 Jul 2008
Total Posts: 14249
24 May 2014 02:19 PM
I tend to not like loops running in the background of my game.
I try to avoid them at all costs.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
24 May 2014 02:20 PM
Under stress tests, the guis showed back up..

So its best to use a loop..
Report Abuse
Ripull is not online. Ripull
Joined: 21 Jul 2008
Total Posts: 14249
24 May 2014 02:24 PM
I guess for now it's going to be the best solution I'm gonna be able to use.

Would you suggest changing the wait() to wait(1), or great though?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image