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

I need help with my HUD to hide when a player joins. Can you help?

Okay, so I'm trying to disable the whole HUD for every player so the HUD doesn't cover the GUI I'm doing. The script I did works in the studio but doesn't work when I publish the game and join. This script is located in StarterGui.

local UserInputService = game:GetService("UserInputService")

UserInputService.MouseIconEnabled = false

local StarterGui = game:GetService('StarterGui')
 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)

wait(9)

local StarterGui = game:GetService('StarterGui')
 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)

wait(0.16)

local StarterGui = game:GetService('StarterGui')
 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, true)

wait(1)

local StarterGui = game:GetService('StarterGui')
 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)

wait(0.22)

local StarterGui = game:GetService('StarterGui')
 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)

local UserInputService = game:GetService("UserInputService")
 
UserInputService.MouseIconEnabled = true

4 comments

0

No

1

Is the script a LocalScript?

0

No, it isn't. I bet that's the problem.

0

It is!

1 answer

To solve this issue, I turned the script from a Script to a LocalScript. Pianotech from two years ago wasn't that smart.

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