#gui visibility
1 messages · Page 1 of 1 (latest)
Hello, im new to scripting but i think it is because you need to change to local players gui instead of startergui
local HoldingQGui=
player.PlayerGui.ScreenGui.TextLabel ```
That code is a really bad way of doing what your trying to do. It creates a memory leak and is overall way too complicated
Your better off doing something like this:
-# It contains a bit of repeated code and could be simplified down but this is just an example
uis.InputBegan:Connect(function, input, typing)
if typing then return end
if input.KeyCode == HoldingQ then
HoldingQGui.Visible = true
end
end)
uis.InputEnded:Connect(function, input, typing)
if input.KeyCode == HoldingQ then
HoldingQGui.Visible = false
end
end)
Or even this (its the same as what your doing but not broken. You should use events instead of this though)
while task.wait() do
HoldingGui.Visible = uis:IsKeyDown(HoldingQ)
end