Hey, guys. I am trying to make a script that finds every single Billboard Gui inside a player's PlayerGui using ClassName, and making them enabled when the player presses the 'e' key. I tried the following inside a localscript, inside the StarterPack, but it doesn't seem to be working. If anyone can teach me the answer to this problem, I would gladly appreciate it!
Player = script.Parent.Parent
mouse = Player:GetMouse()
function onKeyDown(key)
key = key:lower()
if script.Open.Value == false then
if key == "e" then
gui = Player.PlayerGui
for _, gui in ipairs(part:GetChildren()) do
if gui.ClassName == 'BillboardGui' then
gui.Enabled = true
end
end
end
end
end
mouse.KeyDown:connect(onKeyDown)

1 comment
That didn't solve anything....