Lua 无法修复此脚本
我的剧本有问题。我认为这与结局有关,但我真的不知道如何解决它Lua 无法修复此脚本,lua,scripting,roblox,Lua,Scripting,Roblox,我的剧本有问题。我认为这与结局有关,但我真的不知道如何解决它 你所做的一切都是错误的顺序!哦,你需要在末尾加一个括号,就像这样: game.Players.PlayerAdded:Connect(function(player) if player.Name == 'MateoGaming_YT' then player.CharacterAdded:Connect(function(char) local trail = game.ServerStora
你所做的一切都是错误的顺序!哦,你需要在末尾加一个括号,就像这样:
game.Players.PlayerAdded:Connect(function(player)
if player.Name == 'MateoGaming_YT' then
player.CharacterAdded:Connect(function(char)
local trail = game.ServerStorage.Trail:Clone()
trail.Parent = char.Head
--And all the rest of the trail bit
end)
end)
end)
如果你还需要帮助,请尽管问 借用维格斯·维迪康比·加森的答案。看起来您在截图之前已经更正了脚本 输出窗口中以红色显示的错误告诉您如何找出此处的错误
ServerScriptService.Script:14: ')' Expected (to close '(' at line 3) near <eof>
这个代码是正确的。我想让它在我加入游戏时只显示给我的角色
game.Players.PlayerAdded:Connect(function(player)
if player.name == 'MateoGaming_YT' then
player.CharacterAdded:Connect(function(char) -- << this line needed a close parenthesis
-- be careful how you indent here, try to keep everything in the correct tab
local attachment0 = Instance.new("Attachement", char.Head)
local attachment1 = Instance.new("Attachement", char.HumanoidRootPart)
local trail = game.ServerStorage.Trail:Clone()
trail.Parent = char.Head
trail.Attachment0 = attachment0
trail.Attachment1 = attachment1
end) -- end player.CharacterAdded
end -- end if
end) -- end game.Players.PlayerAdded