What do you want to achieve? Keep it simple and clear!
Disable a PlayerGui inside all players.
What is the issue? Include screenshots / videos if possible!
The script is not working
i want delete this for a few seconds image|237x215
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes
--This is my script
local Player = game.Players.LocalPlayer
local playerGui = Player:WaitForChild("PlayerGui")
while true do
playerGui.PlayerGui.KCoreUI.Visible = false
wait(3)
end
Sorry if i made something wrong on this topic, its my first time making a topic.
Okay so If you want to disable all GUIs inside PlayerGui you can use this code:
local player = game.Players.LocalPlayer
for i, v in pairs(player:WaitForChild("PlayerGui"):GetChildren()) do
if v:IsA("ScreenGui") then
v.Enabled = false
end
end
Okay so If you want to disable only this GUI then:
local player = game.Players.LocalPlayer
local guitodisable = player:WaitForChild("PlayerGui").KCoreUI --your gui to be disabled
for i, v in pairs(player:WaitForChild("PlayerGui"):GetChildren()) do
if v:IsA("ScreenGui") and v.Name == guitodisable then
v.Enabled = false
end
end