【发布时间】:2020-08-16 01:52:15
【问题描述】:
我在 Roblox Studio 中的一个脚本出现错误。显示有问题的行是第 13 行。该脚本基本上用于在有人坐在座位上时进行焊接,并启动 TankGUI(另一个很好的脚本)。
seat = script.Parent
function onChildAdded(part)
if (part.className == "Weld") then
while true do
local welde = seat:FindFirstChild("SeatWeld")
if (welde ~= nil) then
local sitted = welde.Part1.Parent
end
if (sitted.Name ~= script.Parent.Owner.Value) then
if (script.Parent.Owner.Value == "NoOne") then
script.Parent.Owner.Value = sitted.Name
print ("sitted steal")
else
print ("stolen!!")
local shipstealer = game.Workspace:FindFirstChild(sitted.Name)
if (shipstealer ~= nil) then
shipstealer.Humanoid.Jump=true
end
end
end
wait(0.2)
if (welde == nil) then
print("BreakLoop")
script.Parent.Owner.Value = "NoOne"
break end
end
end
end
--while true do
-- wait(0.5)
-- script.Parent.Parent.Name=script.Parent.Owner.Value .. "'s Ship"
--end
seat.ChildAdded:connect(onChildAdded)
请原谅我遇到的任何合作不善或语言障碍。我这里还是有点新意。
【问题讨论】: