Lua - 参数 1 缺失或 nil

问题描述 投票:0回答:0

我正在尝试制作一个检查字符的脚本,但在我的脚本中它说参数 1 缺失或为零。这是我的剧本

local Character

game.Players.PlayerAdded:Connect(function(player)
    Character = player.Character or player.CharacterAdded:Wait()
    print(Character)
end)
if workspace:FindFirstChild(Character) then
    print("CHARACTER FOUND")
end

错误在第7行

lua roblox
© www.soinside.com 2019 - 2024. All rights reserved.