Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Won't disable chat, etc?

local Code = 1209 --Not real code, just for purposes


if script.AccessCode.Value < Code then
game.ServerScriptService.Encoded.Parent = game.StarterPack
game.ServerScriptService.Decoded:Destroy()
elseif script.AccessCode.Value == Code then
game.ServerScriptService.Decoded.Parent = game.StarterPack
game.ServerScriptService.Encoded:Destroy()
end

wait(5)
script:remove() --This will not remove, btw. I saw no errors.

My problem is not so much this script, but after I add the Encoded/Decoded script (Both containing wait(3) game.StarterGui:SetCoreGuiTypeEnabled(4, false)) But it won't set/remove, I'll give all three scripts. -Encoded

wait(3)
loadstring('\103\97\109\101\46\83\116\97\114\116\101\114\71\117\105\58\83\101\116\67\111\114\101\71\117\105\69\110\97\98\108\101\100\40\69\110\117\109\46\67\111\114\101\71\117\105\84\121\112\101\46\65\108\108\44\32\102\97\108\115\101\41')()

-Decoded

wait(3)
game.StarterGui:SetCoreGuiEnabled(4, false)

3 comments

0

You have to use the decoded version in a local script, since ROBLOX no longer supports loadstring in a LocalScript, and you can only change CoreGuiEnabled in LocalScripts.

0

You are wrong, I used encoded, worked. But I forgot the local script part, that is why it didn't work, now... Anyhelp on the :remove() Error?

0

How am I wrong? I know encoded loadstrings work in ServerScripts, if the LoadStringEnabled property is active. You need to use the decoded version in a localscript for it to work, without loadstring. The remove function part, I am not sure what could be wrong there, but remove() is deprecated, use Destroy().

1 answer

✓ Accepted answer

To disable CoreGui, put this in a LocalScript in the StarterGui or StarterPlayerScripts:

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, true)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)

game.Players.LocalPlayer:WaitForChild('PlayerGui'):SetTopbarTransparency(.5)  -- This can be .5 or 1

2 comments

0

Not what I wanted, but I figured out how anyways, thanks though.

0

Did not work

This discussion is preserved as it was. New answers, comments, and votes are closed.