【发布时间】:2021-10-09 03:08:24
【问题描述】:
我正在 roblox 中占有一席之地。我写了剧本,看看它,请说它有什么问题??? 在另一个脚本中一切正常!你能帮我吗?
local players = game.Players:GetChildren()
local pupil = players[math.random(0,#players)]
local James = game.Workspace.James
local Texte = game.StarterGui.ScreenGui.Maintexzt
local nameq = game.StarterGui.ScreenGui.Maintexzt.Nameq
function ontouch(hit)
if hit.Parent:findFirstChild("Humanoid") then
print("Trigget working!")
James.Humanoid.Torso.CFrame = game.Workspace.OutOfhere.CFrame
script.Parent.CFrame = game.Workspace.SpawnLocation.CFrame
end
end
script.Parent.Touched:Connect(ontouch)
function ontouchexit()
Texte.Text = "Uh... We did it??"
wait(2)
nameq.Text = players.Name
Texte.Text = "Oh how we make it?"
wait(2)
nameq.Text = James.Name
Texte.Text = "Better, go home!"
wait(3)
nameq.Text = players.Name
Texte.Text = "Go!"
nameq.Text = James.Name
Texte.Text = "But go to my home!"
nameq.Text = players.Name
Texte.Text = "Nope"
nameq.Text = James.Name
Texte.Text = "Your choice, Your die, You can follow me, or not"
end
script.Parent.TouchEnded:Connect(ontouchexit)
请说一下有什么问题,我想完成一个开发的地方。
【问题讨论】:
-
错误发生在哪一行?
-
欢迎来到 StackOverflow。请花点时间阅读Help Center - Asking。通过阅读您遇到的错误并进行一些思考,可以轻松避免大多数像您这样的问题。这意味着,如果您需要我们的帮助 - 请将完整的错误消息发送给我们,包括行号和相关代码。