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

how to change disable a core UI locally? [closed]

Asked by 6 years ago

How would I go about changing to core UI locally I only want it done for a certain player.

0
you can only change core gui in local scripts, so its local by nature. use StarterGui:SetCore() and StarterGui:SetCoreGuiEnabled() Gey4Jesus69 2705 — 6y
0
Thats true. It's not that hard. WideSteal321 773 — 6y
0
Pretty sure you can just use RemoteEvents or something despicablejack2005 83 — 6y

Closed as Not Constructive by Gey4Jesus69, lunatic5, joritochip, and alphawolvess

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

3 answers

Log in to vote
1
Answered by 6 years ago

I made a RemoteEvent inside of ReplicatedStorage called "DisableCoreGUI" and in a script inside of ServerScriptService I basically just did:

game.ReplicatedStorage.DisableCoreGUI:FireClient(game.Players:WaitForChild("Player1")) -- This fires a remote event so the client can receive it.

Inside a local script inside of StarterGui I put

game.ReplicatedStorage.DisableCoreGUI.OnClientEvent:Connect(function() -- When the client is fired in ReplicatedStorage
    local startergui = game:GetService("StarterGui") -- Gets StarterGui

    startergui:SetCoreGuiEnabled(Enum.CoreGuiType.All,false) -- Disables the CoreGui
end)
0
That's a pretty neat use of RemoteEvents. Mirzadaswag 110 — 6y
Ad
Log in to vote
0
Answered by
Vain_p 78
6 years ago
Edited 6 years ago

I am pretty sure you just do

--[[
    Local Script
--]]
game.StarterGui:SetCoreGuiEnabled() -- Its like Enum.CoreGui.All or .Chat/.Backpack I think thats it
0
He wants to hide the UI only for a player. Vik954 48 — 6y
Log in to vote
0
Answered by
Vik954 48
6 years ago

It works. When you add that LocalScript it is first teleported to the PlayerGui folder. So you can do it like this:

if condition then
    script.Parent:SetCoreGuiEnabled(Enum.CoreGui.All, false)
end

Remember to change the condition and to put this code in a local script!

0
SetCoreGuiEnabled doesn't work on PlayerGui despicablejack2005 83 — 6y