Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Expected (to close '(' at line 1) near 'game'?

Asked by
Aepeus 59
8 years ago

I am trying to make a command that gives you a gear but Im getting an error msg "Players.Player1.PlayerGui.Admin.Commands.Gear.Gear.LocalScript:13: ')' expected (to close '(' at line 1) near 'game'" What does this mean?

script.Parent.MouseButton1Click:connect(function()

local ID = script.Parent.Parent.ID.Text
local PlayerName = script.Parent.Parent.Number.Text

x = game:GetService("InsertService"):LoadAsset(ID)
for i,v in pairs(x:GetChildren()) do
v.Parent = game.Players[""..PlayerName..""].Backpack
end
x:Remove()
end

game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
    Text = "[ADMIN] Given Gear to "..PlayerName;
    Color = Color3.new(40,59,75); 
    Font = Enum.Font.SourceSans;
    TextScaled = true 
})
end)
0
You have an extra end on line 11. M39a9am3R 3210 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

It might be the end at line 11, "for" and the "function" at line 1 are the only lines that should have ends.

Ad

Answer this question