Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Won't disable chat, etc?

Asked by 9 years ago
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)
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. M39a9am3R 3210 — 9y
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? fireboltofdeath 635 — 9y
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(). M39a9am3R 3210 — 9y

1 answer

Log in to vote
1
Answered by
Validark 1580 Snack Break Moderation Voter
9 years ago

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
0
Not what I wanted, but I figured out how anyways, thanks though. fireboltofdeath 635 — 9y
0
Did not work promaster11111 -8 — 6y
Ad

Answer this question