0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Roblox Studioを使っているエンジニアの皆さん、StarterPlayerScripts内のlocalScriptからStarterGuiの挙動を制御したいことはありませんか?そんな時のためのテクニックを紹介します!

(呼び出す側のStarterPlayerScripts > localScript)

local player = game.Players.LocalPlayer
local GuiFrame = player.PlayerGui:WaitForChild("ScreenGui"):WaitForChild("ScreenGui_Frame")

-- 行いたい処理
GuiFrame.Visible = false

注意点は2つ。

  • GuiScreenはStarterPlayerScriptsからではなく、
    player.PlayerGuiから呼び出すこと。
  • 初期化時に呼び出したい場合は、:WaitForChild()を利用して呼び出しましょう。

これであなたもStarterPlayerScriptsとStarterGuiを巧みに操れるようになります!🎮✨

おしまい

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?