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

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

Asked by 7 years ago

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
0
No JJay786 -2 — 7y
1
Is the script a LocalScript? Pyrondon 2089 — 7y
0
No, it isn't. I bet that's the problem. Pianotech 48 — 7y
0
It is! 130363 67 — 7y

1 answer

Log in to vote
0
Answered by 5 years ago

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

Ad

Answer this question