为什么我的Luau代码不隐藏我试图隐藏的Guis?

发布于 2025-01-26 23:09:49 字数 1021 浏览 2 评论 0原文

我的代码是为了隐藏一些我不想显示的GUI。 (请注意,这是Luau,我不能因为我不是会员而发布Devforums)

这就是我要隐藏的内容: 链接在这里

我使用的代码是:


local Dialog = false
local Confirm = false
local TalkTo = ""

local ConfirmGUI = script.Parent.Parent.Parent.Parent.ConfirmGUI.ScreenGui -- Avoiding waste of time writing the full directory and having to fail because it's in PlayerGUI

ConfirmGUI.TextButton.Visible = false
ConfirmGUI.TextButton2.Visible = false
ConfirmGUI.TextLabel.Visible = false
ConfirmGUI.TextTitle.Visible = false

我一直在开发人员中遇到的错误是:

  09:04:06.668  ConfirmGUI is not a valid member of PlayerGui "Players.metoplayllol.PlayerGui"  -  Client - LocalScript:6
  09:04:06.668  Stack Begin  -  Studio
  09:04:06.669  Script 'Players.metoplayllol.PlayerGui.DialogGUI.ScreenGui.TextLabel.LocalScript', Line 6  -  Studio - LocalScript:6
  09:04:06.669  Stack End  -  Studio

我使用您看不到的标题是因为它破坏了体验的乐趣。

My code is for hiding some GUIs that I don't want to show. (Note that this is Luau, I can't post to DevForums because I am not a member)

This is what I want to hide:
Link here

The code I used was:


local Dialog = false
local Confirm = false
local TalkTo = ""

local ConfirmGUI = script.Parent.Parent.Parent.Parent.ConfirmGUI.ScreenGui -- Avoiding waste of time writing the full directory and having to fail because it's in PlayerGUI

ConfirmGUI.TextButton.Visible = false
ConfirmGUI.TextButton2.Visible = false
ConfirmGUI.TextLabel.Visible = false
ConfirmGUI.TextTitle.Visible = false

The error I keep getting in Developer Console is:

  09:04:06.668  ConfirmGUI is not a valid member of PlayerGui "Players.metoplayllol.PlayerGui"  -  Client - LocalScript:6
  09:04:06.668  Stack Begin  -  Studio
  09:04:06.669  Script 'Players.metoplayllol.PlayerGui.DialogGUI.ScreenGui.TextLabel.LocalScript', Line 6  -  Studio - LocalScript:6
  09:04:06.669  Stack End  -  Studio

I used a title you can't see because it ruins the fun of the experience.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

温柔少女心 2025-02-02 23:09:49

只需使用此代码

ConfirmGUI.TextButton.Visible = false
ConfirmGUI.TextButton2.Visible = false
ConfirmGUI.TextLabel.Visible = false
ConfirmGUI.TextTitle.Visible = false

Just use this code

ConfirmGUI.TextButton.Visible = false
ConfirmGUI.TextButton2.Visible = false
ConfirmGUI.TextLabel.Visible = false
ConfirmGUI.TextTitle.Visible = false
苯莒 2025-02-02 23:09:49

尝试使用:
script.parent ... parent:waitforchild('virckerngui')。screengui或flip screenguiconfurmgui

Try using:
script.Parent...Parent:WaitForChild('ConfirmGUI').ScreenGUI, or flip ScreenGUI and ConfurmGUI

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文