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?

01script.Parent.MouseButton1Click:connect(function()
02 
03local ID = script.Parent.Parent.ID.Text
04local PlayerName = script.Parent.Parent.Number.Text
05 
06x = game:GetService("InsertService"):LoadAsset(ID)
07for i,v in pairs(x:GetChildren()) do
08v.Parent = game.Players[""..PlayerName..""].Backpack
09end
10x:Remove()
11end
12 
13game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
14    Text = "[ADMIN] Given Gear to "..PlayerName;
15    Color = Color3.new(40,59,75);
16    Font = Enum.Font.SourceSans;
17    TextScaled = true
18})
19end)
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