【问题标题】:Expected '(', '{' or <string>, got 'GUI'预期 '('、'{' 或 <string>,得到 'GUI'
【发布时间】:2020-06-03 04:36:40
【问题描述】:

我正在关注加载屏幕教程,但似乎部分代码有误。

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
PlayerGui:SetTopBarTransparency(0)

local GUI = script.LoadingScreen:Clone
GUI.Parent = PlayerGui --<<-- This part of the script is the part that is causing it

repeat wait(1) until game:IsLoaded()

GUI.Frame:TweenPosition(UDim2.new(0, 0, 1,0),"InOut","Sine",0.5)
wait(0.5)
GUI:Destroy()

【问题讨论】:

  • 这是 Roblox 在 develop.roblox.com 上的教程之一吗?

标签: roblox


【解决方案1】:

您的错误消息告诉您它需要一些括号,但找到了下一行。 Clone 是一个函数,需要像一个函数一样调用:

local GUI = script.LoadingScreen:Clone()

【讨论】:

  • 谢谢!我忘了添加那些
猜你喜欢
  • 2017-07-01
  • 1970-01-01
  • 1970-01-01
  • 2020-01-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-11-29
相关资源
最近更新 更多