PlayerGui.MainGui.TwitterCodeFrame.Enter.LocalScript:14: 预期 'end'(在第1行关闭'function'),但却收到了 <eof>; (roblox studio)

我的代码如下:

script.Parent.Parent.Enter.MouseButton1Click:Connect(function()
    local redeemEvent = game.ReplicatedStorage:WaitForChild("RedeemCode")

script.Parent.FocusLost:Connect(function(enter)
    if enter then
        redeemEvent:FireServer(script.Parent.Text)
    end
end)
redeemEvent.OnClientEvent:Connect(function(str)
    script.Parent.Text = str
    wait(3)
    script.Parent.Text = "在此输入代码!"
end)

但它报错了:

15:53:44.277 Players.(我的用户名).PlayerGui.MainGui.TwitterCodeFrame.Enter.LocalScript:14: 预期 'end'(在第1行关闭'function'),但却收到了 ;您是否忘记在第10行关闭'function'? - Studio - LocalScript:14

原文链接 https://stackoverflow.com/questions/69920169

点赞